A process is killing my RAM but I have no idea what!

-Running LAMP

-Using CakePHP

-I think the Google sitemaps plugin or Google pagespeed plugin my coworker installed is killing the RAM

-512MB installation on CentOS using Webmin

System hostname server1.reservationresources.com (127.0.0.1)

Operating system CentOS Linux 6.3

Webmin version 1.590

Time on system Tue Aug 14 15:46:12 2012

Kernel and CPU Linux 3.4.2-x8664-linode25 on x8664

Processor information Intel(R) Xeon(R) CPU L5520 @ 2.27GHz, 4 cores

System uptime 1 days, 1 hours, 15 minutes

Running processes 114

CPU load averages 0.15 (1 min) 0.78 (5 mins) 0.95 (15 mins)

CPU usage 0% user, 0% kernel, 0% IO, 100% idle

Real memory 487.39 MB total, 465.61 MB used

Virtual memory 256 MB total, 230.02 MB used

Local disk space 19.48 GB total, 2.59 GB used

6 Replies

From what you've described, it's likely that something isn't tuned correctly. From the usage numbers you have, I bet you're reached the point where your Linode is actually OOMing, which means that the kernel is killing an application to free up memory for use. You'll want to look at your Linode's console using LISH to see if this is the case. The kernel usually (disclaimer: this isn't always the case) kills whichever process is the single largest consumer of memory, and so this can provide hints to what needs to be tuned.

dwfreed's advice will lead you to the culprit. For most people who show up on the forum, the problem seems to be having MaxClients set too high when using Apache with the prefork MPM.

Run top, hit the right angle bracket to sort by memory.

http://i.imgur.com/v8yuL.png

I'm having trouble understanding the LISH. Just to be clear, I am in no way / have no experience in being a sysadmin.

Lish works best over shell not the ajax console see https://library.linode.com/troubleshoot … ng-to-lish">https://library.linode.com/troubleshooting/using-lish-the-linode-shell#sph_connecting-to-lish

hi

although it is possible that he is not, it is almost certain that vance is right. being an imcompetent server aministrator myself, i should know!

if you are using webmin (and you are not familiar with the shell) go the the webmin page:

servers > apache webserver > global configuration > edit config file

scroll down and you will find where to reconfigure maxspareservers etc. here are my settings which you could use as a starting point. (there is plenty of advice on the web to help make your apache server more efficient)

 <ifmodule prefork.c="">StartServers       3
MinSpareServers    3
MaxSpareServers   5
ServerLimit      60
MaxClients       60
MaxRequestsPerChild  1000</ifmodule> 

you could also click on the running processes number to veiw what they are. it is my guess that there are a large number of apache httpd processes running. also, the mysql proccess can be a memory hog.

i have a 2gb memory linode (LAMP stack)getting about 1500 visitors per day and i use about 300mb in memory and 6mb in virtual memory (my system does not run a mailserver). a lot of my customers are using the system as a membership system so that there can be a lot of database inputs happening. the system is also a website platform with almost 100 websites on it presently (to help make a comparison with your own traffic and activity)

please note that setting these values is more of an art than a science as there are so many variables which have to be taken into account including what your peak traffic looks like, how many database calls the system is making and what your code looks like, amoug other things

my guess is that there is a lot of swap io being used which is not a good thing (you can view this value in your linode manager)

make sure than when and if you change your apache settings, you restart apache to activate the new values. (there should be a restart apache clink top right in webmin). if it doesn't work out, simply change the settings back to their original.

cheers

rs

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct