VPS - Connection Errors - Site doesn't always load

I upgraded and migrated everything from shared hosting to 300MB VPS.

I noticed that at times, the site loads really quick, but after browsing for a few pages, the website no longer loads. I get this error in my browser:

Oops! Google Chrome could not connect to (mysite.com)

Why does this happen? Is this a DNS type error that will clear up after a few days on it’s own? Or is this a VPS issue? I don’t understand how the website loads up zippy fast for a few pages and then suddenly stops and doesn’t load…

DNS issues doesn’t really make sense in this case because the sites resolving to start with. For more specific help you might post the domain name, do that we can see if there are any other clues. Are you using any type of caching or cloudfare?

Here is one of my site urls: http://goo.gl/ju2PH

I’m not using any caching other than .htaccess to have client browsers cache the page:

480 weeks

<FilesMatch “.(ico|jpg|jpeg|png|gif|js|css)$”>
Header set Cache-Control “max-age=290304000, public”


AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript

#End Gzip

I did enable Xcache earlier but it seemed like that made the site even worse, so I turned it off for now. All of my sites are migrated into the VPS, but only 2 of them (like the one in the link above) are the heavy PHP/MySQL sites. The rest only get maybe 200 visits/day combined.

All sites have PHP set for: 5.4 FastCGI

I tried disabling mod_php, but my thumbnail generator stopped working due to an internal server error… Susposedly the dreamhost wiki says we can turn off mod_php if all domains are configured with FastCGI.

I’m not even sure if the VPS takes a few days for everything to “settle” or what.
Also, here is what my memory currently looks like after I set the VPS memory to 300MB: http://s9.postimg.org/q4dskq0wv/vps_memory_2.jpg

The cached memory went down to a nice level, but the actual memory and CPU load went up. It’s still above 300MB.

I just spent about 10 minutes randomly clicking links on your site. I did finally get into some really long page load times which seemed to clear up if I slowed down to what a normal user would be doing (i.e. loading page and looking at it rather than quickly clicking the next link.)

I was using Firefox rather than chrome. I didn’t get a page timeout, but I suspect that’s the meaning of your chrome message… no response before timeout.

I don’t think your issue will “settle down” and go away.

What is the solution to this? Everything worked fine on a 94MB shared server (5000 visitors per day). How come the sites are suddenly overloaded and timing out after the resources are increased to 300MB? You would think if anything it would speed up and handle MORE traffic.

Maybe some php script that is using a lot of resources? You could try one by one disabling things and seeing if that stops the madness.

Thanks for the responses everyone. I figured out how to fix this!

Just takes a little extra learning on how to use Shell and how to tweak/customize the apache configuration file for my VPS.

Now I’m Extreeemly happy with Dreamhost VPS so far!