Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am having issues where my hosting account keep crashing due to running out of memory usage.

I have a VPS Linux hosting account with 1Gb RAM.

Recently whenever I make any changes to my site and then refresh the site it seems to crash and I have to restart the Virtual Server.

My hosting company emails me also with the following emails:

Swap cache: add 972200, delete 964261, find 201469/251424, race 6+227
Free swap  = 0kB
Total swap = 2097144kB

This is my hosting environment.

2 websites on a VPS hosting account.

I run a main WordPress website. I also am a theme and plugin developer so I have a second WordPress theme that is hosted on the account that displays a "Demo" WordPress theme.

I the last five plugins I have developed I have created an update API that is included with the plugins. This means that users of the plugins will ping my server twice a day to read a text file to check if there is an update for the plugins.

My hosting company states that I should try and optimize my site and this should fix the issue and upgrade to the next level hosting which is 2Gb RAM.

I am trying to determine what it is that can causing these fluctuations and using all the resources. I am working on the "Main" WordPress site to try and optimize this site.

I just have a few questions that I am searching the answers for:

  1. Do you think that hosting my own API for my plugins is a bad idea? Could this be some of the cause of the issues?
  2. Could it be all the database queries that crash the site.
  3. Does using Social Networking plugins that query Twitter, Facebook etc put a big burden on the site resources?

I am trying to make a decision in whether to really scale down the site and remove the API or to just upgrade to a new web host which will cost more money.

Any incite and help would be greatly appreciated.

share|improve this question
    
Do you have shell access yourself? I ask because if you don't, it will be virtually impossible to do any troubleshooting here. If you can regularly repeat the problem, you (or someone) needs to watch while it's happening to determine the cause. From the sounds of what's above, you do not (hosting company emailing you memory usage.. you should be able to determine some basics yourself). As to answer your four questions. 'Do I think': Yes. If you cannot answer the next few questions, you need help running the site. Could this be: Yes, it could. 2: Yes, it could. 3: Yes, it could. –  yoonix Jan 25 '13 at 20:01
    
Thanks yoonix, I am a newbie to VPS hosting. Well had the site running since 2011. Only last 6 months did the issues start. I think I do have Shell access. I sometime using WinSCP to manage the server. –  Jason Jan 25 '13 at 20:06
    
When was the last time you updated WordPress? This sounds like an infected server. –  Chris S Jan 25 '13 at 20:06
    
Yesterday to WP 3.5.1. I just tried to access the site and now I am getting a 403 server error. I haven't made any changes to the server. –  Jason Jan 25 '13 at 20:09

1 Answer 1

It's usually hard to guess the exact cause of such problems, so you should take the "divide and conquer" approach here. Start turning off your plugins one by one to find out the culprit. When you do, generate test workload to determine parts of code that could lead to the issue.

Since in VPS environment you're tightly constrained in the set of tools to be used for diagnostics, it'd help if you could set up a small test server of your own (e.g. in a virtual machine) and try to repeat the issue in a more controlled environment.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.