Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote -1 down vote accepted

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

share|improve this answer
    
So is the problem most likely due to bad code? –  Jack4 Mar 11 '12 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 '12 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 '12 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 '12 at 0:33
    
Ahh i see sorry, i have written it myself. –  Jack4 Mar 11 '12 at 0:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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