SQL-DATABASE ERROR

Database error in WoltLab Burning Board (2.2.0): Invalid SQL: SELECT g.groupid,gc.data, s.styleid, s.templatepackid, s.designpackid, l.languagepackid, tp.templatestructure FROM bb1_groups g LEFT JOIN bb1_groupcombinations gc ON gc.groupids=g.groupid LEFT JOIN bb1_styles s ON(s.styleid='0') LEFT JOIN bb1_templatepacks tp ON(tp.templatepackid=s.templatepackid) LEFT JOIN bb1_languagepacks l ON(l.languagepackid='0') WHERE g.grouptype='1'
mysql error: Out of resources when opening file './DB29605/bb1_templatepacks.MYD' (Errcode: 24 - Too many open files)
mysql error number: 23
mysql version: 5.7.32-0ubuntu0.16.04.1
php version: 5.2.17
Date: 31.10.2020 @ 01:48
Script: /wbb2/profile.php?userid=440
Referer: