0

We have an issue where a site on a shared hosting account is going over the allowed query limit per user; that is set at 100k queries/hr. The site shouldn't be generating that amount of queries TBH and so we are trying to track down where they are all coming from.

The site is built on WordPress and uses WooCommerce so going through the code itself isn't really plausible.

What are ways to diagnose this type of issue!? I have thought of turning on mysql query logging to see all the queries that are being run - by doing this you should easily be able to spot the issue, but the host has refused to turn it on.

Are there any other ways we can diagnose the issue that would likely be able to be done on shared hosting? What about PHP profiling?

Brett
  • 319
  • 1
  • 3
  • 12
  • You've outgrown shared hosting. Move on. 100,000 queries/hour is ridiculously small, limiting you to a few thousand pages/hour or so when all is working well. – Michael Hampton Nov 08 '14 at 15:57
  • @MichaelHampton But the thing is the site shouldn't really be generating that amount of queries. I mean I don't know the underlying code of WP / WooCommerce and how many queries they generate, but the site only gets 80-100/visits a day. – Brett Nov 08 '14 at 16:04
  • Hm, yes, at 80-100 visits in a day, something else is going on. If nobody's visiting your site, you shouldn't have any queries. Suspect compromise. – Michael Hampton Nov 08 '14 at 16:05

1 Answers1

0

You could try the newrelic stuff, they give two weeks trial with full power of their PHP profiler (pretty easily to get the cart of most consuming scripts). You could also use dtrace or systemtap, depending on the OS to track down the consuming script, but this is more complicated (but also more experience-giving and skillful) way.

drookie
  • 8,625
  • 1
  • 19
  • 29