I have a bit of an odd problem. I have a number of application user accounts. One account per application rather than one account per user.
I have one application that seems to be hammering the systems resources. CPU usage is at 99% for MySQL from this single user. If I kill the application then usage for the server goes back down to about 20%.
This user account appears to be continuously running the "show variables" command... as far as I can tell, there is absolutely no reference in the application code to "show variables"... though I'm not sure even that should slow down the machine that much... there are also a handful of queries that appear multiple times in the connections list.
So I have two questions/problems:
- Is there any reason the "show variables" command would be running constantly like this? Any other sql commands that would cause "show variables" to fire?
- Why would I be seeing so many queries getting duplicated for this user? If I have it running from a single PC, that PC generates somewhere around 30-50 connections and many of them are for the same query. So is it running the same query multiple times when it does this?
I'm trying to pinpoint the source of these oddities, so if anyone can point me in some general direction I'd appreciate it.