I have been repeatedly facing the issues with mysql on my server recently. I have tried changing "wait_timeout" , "connect_timeout" and several options which I found using google. Are there any methods / tools that I can use to debug these issues. I tried looking at connections, max_connections.
Any ideas would be great, I am accessing the mysql server using a Background PHP job, which accesses the mysql server every 5 seconds.