Error: Got error 24 "Too many open files" from storage engine MyISAM
Error No: 1030
SELECT COUNT(DISTINCT p.product_id) AS total FROM product p LEFT JOIN product_discount pdis ON p.product_id = pdis.product_id AND pdis.customer_group_id = '8' and pdis.quantity <= '1' AND pdis.date_start <= NOW() AND pdis.date_end >= NOW() LEFT JOIN product_special ps ON p.product_id = ps.product_id AND ps.customer_group_id = '8' AND ps.date_start <= NOW() AND ps.date_end >= NOW() LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN product_to_category p2c ON (p.product_id = p2c.product_id) WHERE p.status = '1' AND p2s.store_id = '0' AND p.date_available <= NOW() AND IF(pdis.quantity, pdis.quantity, '1') = '1' AND p2c.category_id IN (39) AND p.manufacturer_id = '45'