I couldn't find a database specific section to post this in. Hopefully it is OK here.
Ocassionally (maybe once a day) my website goes down and zen states that it cannot connect to the database. What I have noticed is that the mysql instance is spiking the CPU over 100% constantly and doesn't allow zen to serve the pages. I have gone in to mysql and identified the query that is running the cpu up. I am however lost as to where this query is being spawned. Please find below the output from show SHOW PROCESSLIST; I identifed the listed query as the culprit and as soon as I kill it the DB performs normally. Please help...
-----
Id | User | Host | db | Command | Time | State | Info |
+-------+--------------+-----------+--------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+
| 30366 | user | localhost | zendb | Query | 1485 | Sending data | select count(distinct p.products_id) as total FROM products p, products_description pd, products_t |



Reply With Quote

