System running out of memory problem

Hello,

My Debian Squeeze webserver has been running well for approx 150 days now. However, I appear to have experienced my first issue yesterday.

I have received some log messages informing me - "System running out of memory. Availability of the system is in risk."

My logcheck message has been added to the Linode pastebin, as it is fairly lengthy

http://p.linode.com/5759

The only adjustment I have made recently to the vps was an apt-get upgrade to installed an updated version of apache2, and I am wondering if this has anything to do with this issue.

Does anyone have any thoughts on what is causing this issue and how i might be a able to resolve it?

jk

6 Replies

You might have accidentally overwritten /etc/apache2/apache2.conf with the default version while upgrading. Don't press "Y" when apt-get upgrade asks you to replace configuration files! This would undo any optimizations that were made automatically by a Stack Script or manually by you.

Find the section that looks like this:

 <ifmodule mpm_prefork_module="">StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients          150
    MaxRequestsPerChild   0</ifmodule> 

Check the line that says MaxClients. If it's too high, reduce it back to (Your Linode Size in MB, divided by 25) or lower.

It has been a while since i have needed to do anything to this vps and my notes are seemingly not as good as i thought they were.

I think that i must have adjusted these settings when i configured the vps but a cannot remember for sure whether or not i did. However, I thought that a apt-get upgrade did not adjust the config files?

Anyway, i have just checked the apache2.conf settings and they were as your post above. These parameters have now been changed to the following and I will see how things run.

StartServers 1

MinSpareServers 3

MaxSpareServers 6

MaxClients 24

MaxRequestsPerChild 3000

Thank you for your help

jk

Doesn't apt back up configuration files it replaces?

I think it did.

I have checked /etc/apache2 and there are no backups of any original config files in this directory, so maybe i never changed these settings!

Though, if this is the case, it is strange that I have only just experienced these memory issues. It is also possible that i entered a "y" during the upgrade without properly reading the apt-get warning, but i cannot remember doing this.

The website is still feeling sluggish compared to the pre apt-get upgrade of apache2, which concerns me a little.

Maybe I need to start a post in the performance section of this forum.

jk

You said "running well for approx 150 days". Have you rebooted in that time? You could be running something that has a memory leak. Have you looked at htop or top?

The server has been running for 151 days now without a reboot.

I do not rememeber seeing any kernel or glibc stuff from the cron-apt e-mails I recieve, so I have not reboot the server. In fact I do not think I have rebooted the server since it was configured.

This server does seem to be ok now so I think it was probably the apache2 settings that needed to be adjusted, as below.

It turns out that my broadband connection was also having problems as well over the last couple of days. So i suspect the the server has probably been fine since i adjusted the apache2.conf!

Anyway, I will continue to keep a watch on the server and thanks to everyone for the assistance recieved.

jk

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