Using osticket 1.10Sometimes osticket stop working, there is
no access to the panel possible. I have check the logs and found in the
mysql slow query log:
# Time: 161120 19# User@Host: custcare @ localhost # Query_time: 844.755410 Lock_time: 0.000116 Rows_sent: 3 Rows_examined: 227210use custcare;SET timestamp=1479668297;SELECT A2.`id` AS `dept__id`, AVG(DATEDIFF(A1.`closed`, A1.`created`)) AS `ServiceTime`, AVG(DATEDIFF(A4.`created`, A5.`created`)) AS `ResponseTime` FROM `ost_ticket` A1 JOIN `ost_department` A2 ON (A1.`dept_id` = A2.`id`) LEFT JOIN `ost_thread` A3 ON (A3.`object_type` = 'T' AND A1.`ticket_id` = A3.`object_id`) LEFT JOIN `ost_thread_entry` A4 ON (A3.`id` = A4.`thread_id` AND A4.`type` = 'R') LEFT JOIN `ost_thread_entry` A5 ON (A4.`pid` = A5.`id`) WHERE A1.`dept_id` IN ('1', '4', '5') GROUP BY A2.`id`;It seems to block all other processes. In mysql all other queries 'waiting for the table level lock'. Sometimes the query runs even longer as shown in the post above, sometimes until my server runs out of memory! What can I do to prevent this hang-up?