Hi, One of my shares are getting from time to time lock out. i found this error that suggest a problem wit the memory: does anyone have a clue of what is going on? çApr 7 19:34:51 apertus02 kernel: oom-killer: gfp_mask=0x201d2, order=0 Apr 7 19:34:51 apertus02 kernel: [<c0105b76>] show_trace+0x16/0x20 Apr 7 19:34:51 apertus02 kernel: [<c0105b9b>] dump_stack+0x1b/0x20 Apr 7 19:34:51 apertus02 kernel: [<c014cd32>] out_of_memory+0x132/0x160 Apr 7 19:34:51 apertus02 kernel: [<c014e6eb>] __alloc_pages+0x27b/0x2d0 Apr 7 19:34:51 apertus02 kernel: [<c014fe4e>] __do_page_cache_readahead+0x12e/0x2a0 Apr 7 19:34:51 apertus02 kernel: [<c0150333>] do_page_cache_readahead+0x33/0x50 Apr 7 19:34:51 apertus02 kernel: [<c014c1bb>] filemap_nopage+0x2db/0x3a0 Apr 7 19:34:51 apertus02 kernel: [<c01585d6>] __handle_mm_fault+0x2a6/0x1770 Apr 7 19:34:51 apertus02 kernel: [<c011318e>] do_page_fault+0x10e/0xc2c Apr 7 19:34:51 apertus02 kernel: [<c010562b>] error_code+0x2b/0x30 Apr 7 19:34:51 apertus02 kernel: Mem-info: Apr 7 19:34:51 apertus02 kernel: DMA per-cpu: Apr 7 19:34:51 apertus02 kernel: cpu 0 hot: high 0, batch 1 used:0 Apr 7 19:34:51 apertus02 kernel: cpu 0 cold: high 0, batch 1 used:0 Apr 7 19:34:51 apertus02 kernel: DMA32 per-cpu: empty Apr 7 19:34:51 apertus02 kernel: Normal per-cpu: Apr 7 19:34:51 apertus02 kernel: cpu 0 hot: high 186, batch 31 used:11 Apr 7 19:34:51 apertus02 kernel: cpu 0 cold: high 62, batch 15 used:8 Apr 7 19:34:52 apertus02 kernel: HighMem per-cpu: Apr 7 19:34:52 apertus02 kernel: cpu 0 hot: high 186, batch 31 used:0 Apr 7 19:34:52 apertus02 kernel: cpu 0 cold: high 62, batch 15 used:0 Apr 7 19:34:52 apertus02 kernel: Free pages: 55100kB (0kB HighMem) Apr 7 19:34:52 apertus02 kernel: Active:11115 inactive:28396 dirty:0 writeback:0 unstable:0 free:13775 slab:3013 mapped:148 pagetables:1672
Hosting expert mode: kernel: oom-killer
You should be logged in to post new messages. Create an account.
- By:
Juan Jose Pablos - Date: on 2009 Avr. 7 20:58
- Subject: kernel: oom-killer
- By:
Sean - Date: on 2009 May. 14 10:16
- Subject: Re: kernel: oom-killer
No one replied... so I will. :-)
OOM = Out of Memory
That's what will have happened. Run out of memory (or just before, in fact)
and the OOM killer randomly (from a user perspective - of course not truly
random) starts killing off procsses to free up space to survive.
From the OOM Killer run itself you *cannot* deduce why you ran out of
memory. It's generally true that the process(es) that comsume the most
memory will get killed by OOMK, but not certain. Basically, once OOM killer
runs you have to assume the system (if it survives at all!) is unrelaible
and it *must* be restarted.
Then, once back up, you need to monitor memory uasge to see who dunnit.
Leaving aside bug (memory leaks, etc.) in software, the likely candiates in
a hosting environment are,,,, Apache and... Well, Apache is always a good
bet. :-) Seriously: monitor memory usage ('top', 'free', others...) and see
who is eating space. Apache, in a default config, can very easily consume
enough to tip over a 256M system. You need to configure it down so that it's
less liberal in its spawning of processes.
Of course it might be something else. But top etc will tell you who it is.
Login a couple of times a day and see who is growing.
Sean
- By:
Juan Jose Pablos - Date: on 2009 May. 29 13:07
- Subject: Re: kernel: oom-killer
Sean, Thanks for the replying, i have upgrade this share to get another one, and it seems stable, so yes looks like the memory argument is the key. I though that having . php_value memory_limit 96M was enought, maybe is because i have a couple of virtual name servers on apache and they do not apply to that limit.
- By:
Sean - Date: on 2009 Jun. 3 16:39
- Subject: Re: kernel: oom-killer
Since it might be useful to others who turn up here one day, here's where
you'd look in the Apache config to reduce memory consumption,
Bear in mind that on a minimal share (256MB) the *default* Ubuntu Apache2
config can easily, on a very low-loaded server even, cause memory to run
out.
You'd see it easily enough by regular 'top' checks, and watching lots of
apache processes getting more numerous and/or larger.
To squeeze Apache down, you can play with endless parameters of course, all
depending upon your needs and the performance/price compromises you are
prepared to make.
But just to give a pointer: I had Apache eat all my memory in my default
Ubuntu server. I then played with the config and altered:
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 7
MaxClients 15
MaxRequestsPerChild 50
</IfModule>
Now just because those are good for me, does not mean they are good for
anyone else!!! But if you're a bit new to Apache and have memory issues, you
might well want to start with those parameters. Read up on them and change
them. Then monitor!
As I say, not aimed particularly at Juan, who started this thread, but more
generally at those who might end up here and want some ideas.
:-)



