index.php maxing out VPS memory = Error establishing database connection
-
I’m not at all experienced with running websites or how they work on the inside so….here’s whats going on.
Around new years I got a few emails saying my website was maxing out the CPU resources on my shared server and was being flagged, or frozen, or whatever HostGator calls it.
On the second, I contacted HostGator and upgraded my site from shared hosting at $9.99/month to a level 3 HostGator VPS at $49.95/month. Ever since then I have been having trouble with MySQL server stopping. I contacted tech support and they came to this conclusion:
“I investigated the cause of the lack of memory and it is simply a result of sudden small spikes of traffic which spawns additional PHP processes for your WordPress script at /home/jay/public_html/index.php. The numerous PHP processes are eating up all of your VPS’ memory and causing the MySQL server to be killed.
I noticed that you had a recent CPU issue with this site on the shared server. In comparison to the shared server your script was on before, the VPS is substantially weaker and has a significantly lower amount of resources available for your site to use. Sites which have issues on our shared servers, especially for CPU will typically not perform well on anything less than a VPS level 5 minimum. This is the level of VPS which provides a resource level similar to what your account was allowed to use on the shared server, however your account did exceed that even on the shared server. If you decide to upgrade to a level 5 please be aware that you may still run into some issues.
We also suggest looking into hiring a WordPress developer to fully optimize your site and database to get the most out of it without using too many resources. Unfortunately Hostgator does not provide these services and you would have to look elsewhere such as freelancer.com. A properly optimized site can take much better advantage at the resources it has available and would hopefully prevent you from having to upgrade further beyond a level 5. “So I upgraded to a level 5 VPS @ $104.95/month to see if it was the problem. Had the MySQL server reset and put the site in maintenance mode to reduce hits and all was well for about a half day while I was at work. I came home and took the site off maintenance mode after the upgrade to level 5 VPS was complete and after 10 minutes and about 10 page views I have the same problem….which I was originally told the problem was due to spikes of traffic. 10 page views is not a spike in traffic.
I’m running WP Super Cache on my page and followed the optimization settings for wordpress via a HostGator website:
https://support.hostgator.com/articles/specialized-help/technical/wordpress/wp-super-cache-plugin
I’m only running a couple other plugins but they have been installed for many months. Not sure how a plugin could randomly go bad and cause this so I don’t think it’s the cause. This problem started randomly with no changes to website structure or plugins.I have absolutely no clue what to do. I don’t think a wordpress site that has 2-4k page views per day needs a $100/month VPS does it? I have about 150 posts.
- The topic ‘index.php maxing out VPS memory = Error establishing database connection’ is closed to new replies.