I'm currently working migrating a WordPress installation (live on the web) from one hosting solution to another. In doing so, I am testing the new hosting solution (shared server) by editing my local host file, so that


points the IP of hew new solution. On the old host, a page load was averaging ~8 seconds, which is why we are moving hosts. But when I test the new server using my hosts file, the web page loads, and I've verified it's loading from the new server, but it's load time is 30+ seconds.

Is this an issue with the OS having to deal with the hosts file on every request?? The load time on the new server is very even amongst the page requests. It's as if every request time is multiplied by 4.

I need to figure this out before I move my client to a much more awful solution.

I've tested changing the hosts file on OS X 10.10.4 and Windows 7 Enterprise with the same result; pointing www.domain.com to the new server results in 30+ second page loads.

Is there another way to test a domain against a shared server environment, so I can see if this is a local OS issue and not their servers? An IP ping of the shared server stays in the 35ms range so it doesn't seem unhealthy.

Edit Traceroute looks fine, 19 hops.

Edit I was able to get an SSH login. The result of top looks like this:

top - 12:19:12 up 58 days, 10:27,  2 users,  load average: 29.86, 38.15, 35.39
Tasks:   2 total,   1 running,   1 sleeping,   0 stopped,   0 zombie
Cpu(s): 44.0%us, 13.1%sy,  0.0%ni, 35.8%id,  6.1%wa,  0.5%hi,  0.5%si,  0.0%st
Mem:  32953672k total, 31990688k used,   962984k free,  2911692k buffers
Swap:  8388540k total,  1100716k used,  7287824k free, 15149856k cached

11521 lifetiu1  20   0 14952  984  796 R  1.9  0.0   0:00.01 top
18995 lifetiu1  20   0 11528 1628 1292 S  0.0  0.0   0:00.04 bash

Is that Mem use enough to cause this sort of slow down? If so, that's pretty indicative that I should recommend my client go to another host.

  • Did you try running a traceroute on it? Host file resolution should be pretty much instant.
    – william
    Jul 29, 2015 at 17:56
  • Doing so now, will update in a moment.
    – jrothafer
    Jul 29, 2015 at 17:57
  • Well a ping of the server and good traceroute timings would indicate that it's not an issue with host resolution. The server might be overloaded and serving slowly because of a lack of CPU/memory/disk IO/network IO, but you'd have to have a way to view resource usage on it to determine that.
    – william
    Jul 29, 2015 at 18:07
  • Try using FTP to check the bandwidth speed. If other users' processes are using that much of the CPU they're probably tying up the network. Your client should probably go with another host anyways if there's a 30 second delay and your network connection isn't the problem.
    – william
    Jul 29, 2015 at 18:30
  • Transfer speeds were looking like 3MiB/s ... I'll recommend another host. Thank you for yoru help william, if you conglomerate your information as an answer and recommend switching hosts, I'll accept it.
    – jrothafer
    Jul 29, 2015 at 18:36

2 Answers 2


DNS resolution from the hosts files are usually instant. Your ping response time is low, and if there's no obvious routing issues seen with a traceroute or bandwidth issues on your end then it's probably an issue with the server. Checking server resources with top/htop/proc files/ftp can let you know if the server is being overloaded from other users. Based on the information you provided, I'd recommend switching hosts, especially if there's a high page load time from multiple client locations.


Using the hosts file can't be the problem here.

Constant 30+ sec. delay indicates a severe problem, probably beyond simple "lack of resources". Does your web application use database? They are often a bottleneck on shared hosting setup, so if you use it extensively check your queries execution time. And check whether you don't get a timeout somewhere in the code, or for some reason your application doesn't try to connect to the old server (to an address resolved via DNS, etc.).

XDebug could be useful if enabled in PHP. You can also try running your application in a virtual machine on your own laptop (ie. with VirtualBox), to compare the results and debug easily.

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.