Server slow, but CPU, Memory fine

September 3, 2014 11.9k views

This started happening since a few days ago, and I am pulling my hair because I can't figure out what is causing this. The server is working fine, but it seems to have slowed down because I see that the website is not as responsive as it was before (there is only one bigger website on the server). The cron jobs take 3 times as much to execute as before, and when I try to connect to the server by SSH, it takes a while for me to connect. All in all, things have slowed down in general. The weirdest things though is that CPU and memory usage are actually low and within the boundaries where they were before this started occurring. The bandwidth also seems to be in the normal boundaries.

I am checking the processes running, and I see that Apache and MySql take up most of the resources as before. But again as before, they are in the normal boundaries.

I am really baffled by this and I really don't know what to do any more. Could someone please help as this is a very important server for me?

FYI, I am running Cent OS 6.5 x64. Thanks!

  • I just went back and forth with the DO support (thanks Ryan and Maurice). It turned out that this was a very easy fix, so just in case someone else encounters this, here is the solution:

    Edit the /etc/resolv.conf file. The contents of this file looked like this for me:


    Instead, contents should be like this:

    When I saved the file, the server went back to normal speed. Hope this helps anyone with the same problem.

  • Would this work for everyone or are these nameserver IPs specific to your droplet?

  • @ D. No, those values are not specific to my droplet, you can use them too.

  • thanks @alexbet its two working fine for me now.. i had a simple static website built using Codeigniter and i was getting very slow response...

    but after following guide given by you... my websites works like charm... thanks a lot..
    my changes to the /etc/resolv.conf

    nameserver my-droplet-ip-here
  • @alexbet and @muhammadsufiyan that is very misleading, as the it clearly says "# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN" in the top of that file.

    For farts and hiccups I just tried it, and yes the droplet's CPU usage is clearly dropping when rebooted, but the lines you've mentioned is being whipped at reboot.

3 Answers

You would surprised how many command line utilities rely on DNS resolution at this point in time so if you're /etc/resolv.conf is out of date or has bad entries that are unreachable it can cause the server to feel horridly slow when in fact nothing is actually broken. That's because it's querying nameservers and has to wait for the timeouts before it can continue.

I got this issue too, but it seems not the DNS matters.

Have another answer? Share your knowledge.