Warning: mysqli::query(): (HY000/23): Out of resources when opening file '/tmp/#sql_77ed_0.MAD' (Errcode: 24 "Too many open files") in /var/home/citymaker/www/lib/DatabaseMysql.php on line 184

Fatal error: Uncaught DatabaseMysqlException: #23: Out of resources when opening file '/tmp/#sql_77ed_0.MAD' (Errcode: 24 "Too many open files") Query: SELECT c.*, COUNT(*) post_count FROM categories c INNER JOIN posts p ON 1=1 INNER JOIN post_keys pk ON 1=1 WHERE (c.cat_type='ad') AND (c.org_id IS NULL) AND (c.parent_id=541) AND (p.published=1) AND (p.subcat_id=c.id) AND (p.id=pk.post_id) AND (pk.feed_key='17P1') GROUP BY c.id ORDER BY c.name in /var/home/citymaker/www/lib/DatabaseMysql.php:216 Stack trace: #0 /var/home/citymaker/www/lib/DatabaseMysql.php(186): DatabaseMysql->check_reconnect('query', Array) #1 /var/home/citymaker/www/lib/DatabaseMysql.php(661): DatabaseMysql->query('SELECT c.*, COU...') #2 /var/home/citymaker/www/lib/DBObject.php(178): DatabaseMysql->select(Array, 'c.*, COUNT(*) p...', Array, Array) #3 /var/home/citymaker/www/lib/portal/posts.php(196): DBObject::select(Array, 'c.*, COUNT(*) p...', Array, Array) #4 /var/home/citymaker/www/lib/Controllers.php(121): Portal_Posts->run() #5 /var/home/citymake in /var/home/citymaker/www/lib/DatabaseMysql.php on line 216