0

When it's just me testing my site (which is live) I have a few jQuery bits and bobs causing the CPU Usage, Memory Usage and Entry Processes to become full on host server.

  • CPU Usage: 100%
  • Memory Usage: 262144 / 262144 KB
  • Entry Processes: 4/10

My jQuery makes requests every minute so really with just me it shouldn't need to use the whole CPU I have allocated surely? All it does is do a quick db search.

1 Answer 1

-1

Use the chrome profiler to see what jQuery is causing the memory leak.

You can also try mtop to monitor mysql http://mtop.sourceforge.net/

mysql query analyzer http://schlueters.de/blog/archives/150-MySQL-Query-Analyzer-and-PHP.html

Another php mysql query monitoring script http://forums.cacti.net/about3522.html

8
  • So is the problem most likely due to bad code?
    – Jack4
    Mar 11, 2012 at 0:16
  • Are your jQuery plugins up to date as well as other scripts? You can test if it's a plugin by disabling them all and then re-enabling them one by one by just commenting out the lines, and running top in a terminal. Check in chrome developer tool and if it's not a plugin start debugging other queries. Have you custom coded any part of the site to query MySQL?
    – Anagio
    Mar 11, 2012 at 0:24
  • I am using the latest jquery: <script src="code.jquery.com/jquery-latest.js"></script>, im not sure what you mean by "Have you custom coded any part of the site to query MySQL?" My interperatation of the question (correct me if im wrong) the jQuery every 40 secs or so queries the database automatically which will naturally create a stress on the server, but to max out with just 1 request is strange.
    – Jack4
    Mar 11, 2012 at 0:30
  • What I meant was did you write any php or jquery to query your mysql database. Or are these all plugins / scripts you just installed on your site? If it's a plugin querying your database every minute or so. What is the name of it? Have you disabled it to test if that is the one causing the problem?
    – Anagio
    Mar 11, 2012 at 0:33
  • Ahh i see sorry, i have written it myself.
    – Jack4
    Mar 11, 2012 at 0:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.