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 p.* FROM posts p INNER JOIN post_keys pk ON 1=1 WHERE (p.published=1) AND (pk.post_id=p.id) AND (p.id != 6560) AND (pk.feed_key='42PaRe') AND (pk.post_time <= '1469591164') GROUP BY p.id ORDER BY pk.post_time DESC LIMIT 3 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 p.* FROM...') #2 /var/home/citymaker/www/lib/DBObject.php(178): DatabaseMysql->select(Array, 'p.*', Array, Array) #3 /var/home/citymaker/www/lib/model/Post.php(879): DBObject::select(Array, 'p.*', Array, Array) #4 /var/home/citymaker/www/lib/block/big/similar.php(88): Post::select(Array, 'p.*', Array, Array) #5 /var/home/citymaker/www/lib/Controllers.php(121): Block_Big_Similar->run() #6 /var/home/cit in /var/home/citymaker/www/lib/DatabaseMysql.php on line 216