I have a mysql server which is occasionly returns the 'too many connections' error. I have worked with the server admin to set the mysql and server vars up to the best. We reckon it's down to a query which takes extremely long, then locks a table and thus backups others.
Was wondering what would be the best way to catch this problem?