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 orgs o ON 1=1 WHERE (o.portal_id=2) AND (o.published=1) AND (o.row_type >= 1) AND (c.cat_type='org') AND (c.parent_id=763) AND (o.subcat_id=c.id) GROUP BY c.id ORDER BY 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/catalog.php(109): DBObject::select(Array, 'c.*, COUNT(*) p...', Array, Array) #4 /var/home/citymaker/www/lib/Controllers.php(121): Portal_Catalog->run() #5 /var/home/citymaker/www/lib/Controllers.php(272): InnerController->runCache in /var/home/citymaker/www/lib/DatabaseMysql.php on line 216