6 second delay before site starts loading... why?


#1

I noticed some commercial sites like: ebay, apple, amazon, etc., load (or start to load) immediately after pressing the enter key in the address bar of my browser.
However, my DreamHost sites take about 6 or 7 seconds to begin the loading process. When it does start loading… it loads super fast. The very first time produces this enormous delay. If I reload the page, it loads fast. Why? Is this a DNS issue? I’ve run the DNS test from free sites like pingdom and I get green (ok) status indicators across the board.
I’m worried that my site visitors may not wait the 6 or 7 seconds for my site to load the first time.
Again… the site itself is fast… I have all the cache options enabled and I have speed optimizations service turned on. I’m using a virtual private server (VPS) for my hosting and a 2nd VPS for my MySQL database… so, this can’t be a shared hosting issue. Again, this is a “first time loading the site” question. Please help.
My site address is: matthaas.com


#2

try your tests loading a static file from the server. if it’s fast, then the problem is in your method of generating pages.


#3

Looking at your site, its pretty simple and basic, and it does seems to have a slightly longer than average delay as it begins to load. Watching the page load in firebug, I don’t see any particular page element that is dragging.

Check the dreamhost panel and see if your webserver and database server are in the same datacenter. https://panel.dreamhost.com/index.cgi?tree=status.dc&


#4

Thanks for the suggestion… yes, both the webserver and database server are in the same location (Virginia).


#5

If you have plugin’s enabled, either disable all and add them back one at a time, or disable them one at a time. I prefer the first approach personally because if it still happens with all plugins disabled, the next thing to elimatate is the theme and you do that by changing to the default theme. If the problem clear up with no plugins enabled then re-enable them one at a time until you find the hog. Sounds straightforward right? It’s really not because where this stops doesn’t completely answer the question… as it may be a certain combination of plugin’s don’t behave well together type of thing, more research and experimentation may be required.


#6

I don’t know if you changed anything yet.
Firefox under Tools -> Web Developer -> Network shows a few JavaScript files taking about 2 seconds or more. It’s taking less than a second to fetch the document itself, so I’m doubting at the moment PHP is bogged down. I would try relocating the SCRIPT elements to the end of the document instead of within the HEAD element.