memoryleak? oomkiller kills processes
Hi,
Fedora core 3 runlevel 3 used as a webserver Since a while this system is loosing memory . When the memory is empty oom-killer kills processes f.i. httpd mysqld. So the systems becomes unusable. I have no process withs consumes the load of memory After a reboot the same happens again. How can I find the "thing" that takes the memory? Thanks in Advance Donald |
Spying processes.
There are two very useful programs to spy processes, ps and top.
Both run on a terminal, top is interative, while ps just dumps the info on the screen, so I recomend you top (if you where writing a script, ps whould be better). To run, open a terminal and enter the command "top". You problalbly want to sort the processes by memory use, if I remember it right, you do that pressing "m", if I am wrong, try pressing "h" to see a help screen. |
Hi Marcos,
I used top and ps (and free, /proc/meminfo), but can not find strange things. Memory level is getting lower and lower though. Greetzz Donald |
Hello,
from http://linux-mm.org/docs/oom-killer.php : Quote:
|
oom-killer kills processes because the memory is low. It is a syptom.
I need to know why the memory on the system is running low, so oom-killer does not need to kill processes. oom-killer helps a system, without it the system would 'die'. |
Is swap enogh?
Are you sure you jave enogh memory + swap to run everyting you are running?
Some programs consume a lot of memory on only a few tasks, so they may be stable for a time, but suddelnly run aout of memory. Also, if you have a memory leak, you will se the memory use of the offending program grow up all the time (it's different to grow up and keep there, several programs don't release their memory while running, this is ok). You must examine their usage several times and see if the memory usage of a program is growing. |
Hi Marcos,
The machine has 200 of the 500 Mb free after booting. It also has 2 Gb for swapping. Basicly it runs httpd and mysql with a quite statical website. Until last week the machine woked without problems for months without booting. The last weeks I have to to boot twice a day. No additional software is added. I update the machine with yum daily though. Do you know of a tool which can print the memory usage of processes, So I can put that in cron and analyse it later? |
Hi, Dkok.
Well, ps -A -l display all process information on stdout. You can redirect it to a log file. The problem is that this is quite a verbhouse dump, you will problably want to make a script to walk through it. Knowing that the position of older processes on the dumps don't change will help. But the problem you descripbe is quite a weard one. Are you sure no software has changed (even actualized)? You may want to look for a worm with those simptoms. Sorry I can't really help you, but I never saw anything like that before. |
All times are GMT -5. The time now is 03:35 AM. |