Inconsistent slow DB connect times
- by mcryan
I have an app that shows significantly increased load times every 5 minutes. We use New Relic and I've been able to identify that every slow request is due to our DB connect functions.
I've looked through our frontend servers and db servers and have ensured that there are no cronjobs running every 5 minutes - though the increase comes every 5 minutes without fail. I feel like I've tried everything I can to isolate this but I'm not having any luck. It is not coming from a cronjob, there is no cache expiring every 5 minutes, etc.
What else could I check, and does anyone know of anything that could cause this sort of behavior?
For what it's worth - our stack includes Apache, PHP, MySQL, Varnish and Memcache. SQL and memcache are running on dedicated servers and we have a number of frontend servers behind a load balancer, each running Apache and Varnish.
Spike every 5 minutes:
And it's always db connect (in red) taking up all of the time: