Apache2 webserver using Way to much ram (146GB)

1

I have a Ubuntu 64 webserver with Apache, Mysql, php5, and ssh. 265MB ram, unlimited Swap. (about 1TB) My issue: Today the webserver was down, I tried to ssh to it and it was Extremely slow. I stoped apache, and tried to restart it a few times by first killing stray apache ps as needed until all related to apache was stoped. It failed to start and was very slow. I then shut the server unit down and started it up. When I checked the server box statistics it showed usage in the past hour as:

Swap: 50mb (read) 30MB (write) 11:00am Swap: 146GB (read) 6GB (write) 12:00am The CPU was also high, but not to a allarming extent. My questions are: How do I solve this apache2 issue? (this is the second time it happened, after the first 3months ago I did a New install) And how do I prevent it? What configs can I change to prevent apache from using more than a certain amount of ram?

Thank you

SteveLacy

Posted 2012-08-25T19:14:17.167

Reputation: 115

Do you mean 256GB of RAM? Also, a swap file is on disk, not in memory. – None – 2012-08-25T21:29:04.927

256 MB not GB, I do know that swap is not ram, I forgot to add that the ram was at 100% which caused the swap overflow – SteveLacy – 2012-08-26T02:26:03.140

Answers

0

I think that here (Introducing LAMP Tuning Techniques - O'Reilly Media - http://goo.gl/aq9KG) you will find some useful tips.

Most of this configurations take place in your apache httpd.conf file for what you might also find useful this: Understanding an httpd.conf File (TCP/IP Network Administration, 3rd Edition) - http://goo.gl/efycF

M.Octavio

Posted 2012-08-25T19:14:17.167

Reputation: 141

I will modify my httpd.conf file to add swap limits where possible – SteveLacy – 2012-08-27T05:43:12.090