bn520995
By:
bn520995

Extremely bad server response times and page load times

May 4, 2015 4.6k views
WordPress One-Click Install Apps Ubuntu

I am getting outrageously bad server response times and page load times on a digital ocean WordPress image installation. I have used this many times in the past without any issue. My load times are between 5 seconds to 60 seconds averaging around 10 seconds. Similar setups I've been getting <2 seconds in almost all cases. The first packet/first byte often shows >3 seconds.

There is absolutely nothing to explain this.

Server load is 0.00 - 0.10
There is plenty of free memory
There is plenty of free swap file space
CPU is mostly idle
There are no errors or warnings in the mysql error or the apache error log
There is nothing abnormal in the apache access log

What can possibly be causing such terrible performance?

Waterfall tests show that most resources are loaded with pretty poor times but 2 or 3 static resources like images or javascript files take 5 seconds, 10 seconds or even more to load. (maybe 50kb or 100kb per file).

How can I diagnose the problem?

Thanks.

5 comments
  • The first thing I would try is to change the DNS servers listed in /etc/resolv.conf

    Depending on the configuration, apache will attempt to do reverse lookups when a request is received and if the DNS servers are slow to respond it can slow the response of the web server. You can use the ones provided by opendns.org to test this.

    If you continue to have problems like this I would recommend opening a ticket with our support team so they can take a look and see if there are other issues they can address.

  • I am working with support too (waiting for a response) but I thought I would also ask the community.

    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 2001:4860:4860::8844
    nameserver 2001:4860:4860::8888
    nameserver 8.8.8.8
    

    This is what I have now but it says not to manually edit this... so how do I do it?

    Do you mean that I should use these? OpenDNS.org redirects to OpenDNS.com which is selling all kinds of services. I found these just on Google.

    OpenDNS IP Addresses
    208.67.222.222
    208.67.220.220
    

    Are these really any better than Google's free DNS?

    I have never had to change this setting on any other digital ocean server and my other sites run fine.

    Please tell me how to proceed.

    Thanks.

  • Here is the site with the problem by the way: http://tinyurl.com/2bsnohn

    I have CloudFlare installed but it doesn't matter whether I disable it or not.

  • Hello. Was this resolved? If it was, would be interested to know the solution should I encounter similar problem in the future.

  • The problem went away after some time but the cause was never pinned down. I never got an answer on the DNS either.

2 Answers

I have been getting "Reduce server response time" issues with the Pagespeed Insights tool.

To test whether it is due to some slow PHP script or Wordpress or hosting issue, I duplicated my website at Digitalocean and pasted it in Google Cloud - Google Compute Engine instance.

Problem solved! In Google Cloud I'm able to get faster server response times and pass the Pagespeed test with flying colors even with the smallest VPS in gcloud.

So it's not due to PHP or Wordpress. Digitalocean server has server response time issues. The difference was between 300ms and 1s.

Have another answer? Share your knowledge.