Initial DNS request to website Ridiculously Slow ~ 3-5 seconds

December 3, 2014 3.6k views

Hi all
Im experiencing really slow initial response to DNS/website requests.
Just finished up migrating a WP site on a Debianx32 LEMP stack droplet and everything is working 'fine' except for when i do a speed test.

The initial GET request to the DNS takes on average 3-5 seconds to complete.
The overall page loadtime becomes 3 seconds longer than it should be..
Page load time: 5.24s
Total page size: 1.12MB
Total number of requests: 60

Page load time should ideally be ~ 2 seconds at the minimum..

atleast it was on a previous shared hosting account..
i expected/hoped that ssd and closer datacenter to be at or below a shared host.

Any ideas on how i can tweek/troubleshoot this?

Ive tried with and without cloudflare CDN to see if i can speed it up but it makes no difference.

the dns are current set to google and level3 as a backup

Why the severe latency/slow reponse?

Thanks for any suggestions..

1 comment
  • The fact that you saw no change in this when enabling CloudFlare would point to the slow response coming from one of the DNS servers you have configured. I would recommend removing the Level3 server from your configuration to see if it makes any difference.

1 Answer

Hi ryan..
thanks for the suggestion

I edited the /etc/resolv.conf file and removed level3 dns..
i now show..
Saved and exited..
do i have to restart networking or are the results live as soon as i save?

pinging shows it working
ping -c 1

but unfortunately the speedtest still shows initial DNS lookup taking nearly 310ms ~ 3 seconds..which is more than it takes to load the rest of the site =(

Really confused.. is there anything else i can investigate to try to resolve this issue?

Have another answer? Share your knowledge.