First off sorry if this is the wrong section I couldn't quite from a proper one for my question. I'm having a problem where my memory is sucked up by I believe PHP. At first it was one a week but now its almost happening daily where all my memory is used up and I can't access the server anymore.
Once when it happened I had my host go in and he said PHP used up all my memory and both 512 of mem and 512 of swap were used up. Now I can ping the box when this happens but I can't ping via domain name and can't SSH in via ip or domain.
I'm a Windows guy and honestly I'm not sure where to start with this in linux I've been trying to look on Google and what not but I just can't seem to find anything decent for a starting point.
My server is running CENTOS 5 x64 Cpanel with the shoutcast admin panel addon and fantastico I have 7 or so domains but many of them just run Wordpress. I'm just trying to figure out how can I find out what is causing the issue so I don't have to reboot my server everyday.
512MB simply isn't enough for what you are running... you can probably make it work, but it's not going to be close to optimal at all. bite the bullet and get more RAM (I wouldn't count the swap as available memory which I think they suggested to you).
www.idologic.com - Reseller, VPS and dedicated hosting - Friendly Customer Service - DirectAdmin - cPanel - InterWorx
Do the 7 sites receive much traffic? cPanel has done a tremendous job at reducing it's memory footprint, but with the number of tasks it's involved in, it still does use quite a bit of memory. I would recommend looking switching to using PHPSuexec to see if there might be a process that is hanging around as well.
It may simply be time to add a little more RAM to your VPS though.
Thanks so much guys for the replies. So yeah I host 7 sites but at the end of the month maybe 40GB uses in total traffic none of the sites get much in the way of hits.
I was able to fix the issue by changing the number of connections and such I've seemed to get memory under control I was seeing a lot of OOM killer processes for PHP. Since changing the number of PHP connections and such the server has been a tad sluggish but honestly I'm just happy everything is running and the server hasn't gone down. Should I probably upgrade the ram maybe but honestly until I really get pushed to do so I won't.
PHP was the issue messing around with PHP.ini settings and hit and miss fixed it although I must say I made a huge mistake I used that auto calculate memory usage and I took down all my wordpress sites with error 500's after some figuring out what happened I erased it and fixed the issue.
typical BW usage:
April 2011:36.87 Gig
March 2011:22.84 Gig
Root is always using the most with 23% used depending on how the server looks I may get an extra 512mb but already spending $30 a month and I love my host but I have my spending limits too.