Error: Out of resources when opening file '/tmp/#sql_40df_0.MAI' (Errcode: 24 "Too many open files")
Error No: 23
SELECT *, pd.name AS name, p.image, m.name AS manufacturer, ss.name AS stock, (SELECT AVG(r.rating) FROM ocreview r WHERE p.product_id = r.product_id GROUP BY r.product_id) AS rating FROM ocproduct p LEFT JOIN ocproduct_description pd ON (p.product_id = pd.product_id) LEFT JOIN ocmanufacturer m ON (p.manufacturer_id = m.manufacturer_id) LEFT JOIN ocstock_status ss ON (p.stock_status_id = ss.stock_status_id) WHERE p.status = '1' AND p.date_available <= NOW() AND pd.language_id = '2' AND ss.language_id = '2' AND m.manufacturer_id = '12' ORDER BY pd.name ASC LIMIT 72,12