Tygh\Exceptions\AException

Message

Can't open file: './highload_demo_mv/cscart_discussion_rating.frm' (errno: 24 - Too many open files) (1016)

SELECT cscart_discussion.object_id AS product_id, AVG(cscart_discussion_rating.rating_value) AS average_rating, cscart_discussion.type AS discussion_type, cscart_discussion.thread_id AS discussion_thread_id FROM cscart_discussion LEFT JOIN cscart_discussion_posts ON cscart_discussion_posts.thread_id = cscart_discussion.thread_id AND cscart_discussion_posts.status = "A" LEFT JOIN cscart_discussion_rating ON cscart_discussion.thread_id = cscart_discussion_rating.thread_id AND cscart_discussion_rating.post_id = cscart_discussion_posts.post_id AND cscart_discussion_rating.rating_value != 0 WHERE cscart_discussion.object_id IN (53382, 147880, 103048, 156703, 90492, 69888, 75861, 59765, 53381, 42347, 116033, 22390, 18675, 27817, 17065, 6289, 6472, 13730, 132720, 132722, 132721, 102021, 102020, 102019, 102018, 102016, 102017, 102022, 102034, 80260, 78886, 148865, 155587, 155586, 147320, 147318, 148863, 148864, 36781, 35322, 20625, 15861, 15792, 15824, 13287, 15899, 15791, 15765, 15600, 15820, 15833, 14288, 2160, 7714, 39868, 39867, 39866, 39865, 39864, 39863, 39862, 39860, 39859, 39858, 39857, 2095, 20412, 17746, 11679, 37326, 59890, 35323, 35324, 34085, 35327, 35326, 34083, 34084, 55264, 106606, 24553, 132938, 133397, 103748, 122871, 191229, 50003, 103888, 137141, 137140, 137139, 137138, 122875, 122876, 109078, 122868) AND cscart_discussion.object_type = "P" GROUP BY cscart_discussion.object_id

Error at

app/Tygh/Database/Connection.php, line: 1127

Backtrace

File:app/Tygh/Database/Connection.php
Line:491
Function:throwError
File:app/Tygh/Database/Connection.php
Line:249
Function:query
File:app/functions/fn.database.php
Line:44
Function:getHash
File:app/functions/fn.catalog.php
Line:7928
Function:db_get_hash_array
File:app/functions/fn.catalog.php
Line:7840
Function:fn_load_extra_data_by_entity_ids
File:app/functions/fn.catalog.php
Line:7628
Function:fn_load_products_extra_data
File:app/controllers/frontend/categories.php
Line:105
Function:fn_get_products
File:app/functions/fn.control.php
Line:679
Function:include
File:app/functions/fn.control.php
Line:430
Function:fn_run_controller
File:index.php
Line:25
Function:fn_dispatch