Operating System - Linux
1821245 Members
3060 Online
109632 Solutions
New Discussion юеВ

memoryleak? oomkiller kills processes

 
Donald Kok
Respected Contributor

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
My systems are 100% Murphy Compliant. Guaranteed!!!
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: memoryleak? oomkiller kills processes

I you have time, you need to figure out where the leak is.

It could be the httpd server itself. It could be mysql. It could be a DOS type attack on the httpd server or other application.

Shut down and leave shut down suspected applications one at a time until the system is stable. Then you know which application to focus on.

If its a httpd attack, check the access_log file for entires that don't belong. If the machine is exposed to the Internet and there are a lot of gets or posts to websites you don't host, you have a DOS problem and I can provide specific help on stopping it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Vitaly Karasik_1
Honored Contributor

Re: memoryleak? oomkiller kills processes

Donald, what do you see in the top of "top"
output [sort by memory usage by press "M"]?
Donald Kok
Respected Contributor

Re: memoryleak? oomkiller kills processes

The biggest poces is httpd with 10M.
There is 4M free at the moment, while swap is almost unused.
Here follows the output of vmstat and top
vmstat -s -S M -a
503 M total memory
495 M used memory
170 M active memory
230 M inactive memory
7 M free memory
211 M buffer memory
161 M swap cache
1960 M total swap
25 M used swap
1935 M free swap

top (ordered by memory:)
top - 11:23:36 up 2 days, 1:57, 2 users, load average: 0.01, 0.03, 0.00
Tasks: 67 total, 1 running, 66 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.3% us, 0.0% sy, 0.0% ni, 99.7% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 515116k total, 501692k used, 13424k free, 216304k buffers
Swap: 2008040k total, 25804k used, 1982236k free, 167004k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31791 apache 15 0 17272 5548 2396 S 0.0 1.1 0:00.08 httpd
27595 apache 15 0 17376 5492 2308 S 0.0 1.1 0:02.93 httpd
27601 apache 16 0 17376 5264 2120 S 0.0 1.0 0:00.43 httpd
2289 ntp 16 0 5140 5132 3440 S 0.0 1.0 0:05.08 ntpd
2758 root 16 0 13288 3148 1288 S
My systems are 100% Murphy Compliant. Guaranteed!!!
Vitaly Karasik_1
Honored Contributor

Re: memoryleak? oomkiller kills processes

I suggest to run "top" via cron every 5 minutes, for example, so we'll able to see which process[es] eat memory.
Chakravarthi
Trusted Contributor

Re: memoryleak? oomkiller kills processes

if you do not want to use top,
you can use
ps -aux command.
Donald Kok
Respected Contributor

Re: memoryleak? oomkiller kills processes

The system works ok now. I do not know exactly why, but it has something to do with:

- cronjobs starting when the previous version was not finished.
- the configuration of /etc/pam.d/crond
- the running of lots of mrtg-jobs



My systems are 100% Murphy Compliant. Guaranteed!!!
Donald Kok
Respected Contributor

Re: memoryleak? oomkiller kills processes

So this thread is closed.
My systems are 100% Murphy Compliant. Guaranteed!!!