I am in charge of a website that has about 150 unique users a day. The website hosts forms and gauge data, providing calculations and alerts. It runs well, but for some reason there are intermittent long response times; even for simple requests. For instance I will load one webpage in less than 2 seconds and then another time it will take 20+ seconds to respond. I've even had it take up to 60 seconds before. 3/4 of the time the pages will load fast, but 1/4 of the time it takes much longer to load the same exact same content. I used htop during the long response times to see if there was a program hogging all the CPU or memory, but I could not get consistent results. Sometimes the server load was high when I got a slow response and sometimes there was nothing running at all when I got a slow response time.

I am new to system administration so I'm struggling to find a good way to pinpoint the error. I've checked all of my logs and found nothing.

Here's a screenshot from atop when a request was taking a while to load: http://imgur.com/WFJIME1

and here's a screenshot from htop: http://imgur.com/rMUxVZ1


Based on the resources that mysqld seems to be grabbing, it might prove useful to make sure that your settings for mysql are tuned appropriately.


Another helpful tool is iostat which can give you a more clear picture of what your disks are doing at the time of the stall.

And there's always tcpdump, but I might wait until you've exhausted the internal strategies before digging that deep..

| improve this answer | |
  • Thanks for the help. It turns out it was due to a mix of inefficient code and my cruddy internet connection at my house. – IT_Guy Feb 19 '16 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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