[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

apache using more and more RAM



Hi,

Since a few days, apache runing on a potato seems to use more and more
memory.
we are looking every where on the server to find thomething wrong, including
rootkit, and passing some MD5 tests and we are going to ugrade memory from
256 to 512.

Its not a very busy server but it runs apache/1.3.9, MySQL 3.23.39 and
Coldfusion 4.5.1.
It has been runing fine during one year whithout problem and the traffic is
quite stable.

1) I have to say that I dont know much about use and management of memory.

2) the actual apache processes configuration is :

# CacheNegotiatedDocs
Timeout 300
KeepAlive On
MaxKeepAliveRequests 60
KeepAliveTimeout 15
MinSpareServers 4
MaxSpareServers 8
StartServers 4
MaxClients 100
MaxRequestsPerChild 20

(I reduced a bit the Servers numbers).

When I restart apache, it frees aprox. 14 or 20 Mo RAM, then apache (I
believe it's apache, but...) begins to take slowly more and more memory,
until every thing hangs (I mean we lose connection, ssh fails) in this case
our only escape is to remotly cut the power :). I know 256 Mo is not much,
but how to explain it was enough for 1 year.
I wonder why the server doesn't use the swap memory and use so much buffered
mem.

whithout apache :
 10:46am  up  1:39,  5 users,  load average: 0.00, 0.03, 0.00
56 processes: 55 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  0.1% user,  0.9% system,  0.0% nice, 98.8% idle
Mem:  257332K av, 220616K used,  36716K free,  33736K shrd, 125000K buff
Swap: 240964K av,    592K used, 240372K free                 60964K cached


just after apachectl restart :
 10:46am  up  1:39,  5 users,  load average: 0.00, 0.03, 0.00
64 processes: 62 sleeping, 2 running, 0 zombie, 0 stopped
CPU states:  0.7% user,  0.7% system,  0.0% nice, 98.4% idle
Mem:  257332K av, 222648K used,  34684K free,  50656K shrd, 125000K buff
Swap: 240964K av,    592K used, 240372K free                 60992K cached


we thought a regular reboot could be a good medecine :
 10:58am  up 5 min,  2 users,  load average: 0.01, 0.06, 0.03
57 processes: 56 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  0.0% user,  1.1% system,  0.0% nice, 98.8% idle
Mem:  257332K av,  54580K used, 202752K free,  48924K shrd,   2988K buff
Swap: 240964K av,      0K used, 240964K free                 32148K cached

everything looks much better, no more buffered memory and a lot of free
memory.


after 2 hours
 12:51pm  up  1:58,  2 users,  load average: 0.06, 0.02, 0.00
63 processes: 61 sleeping, 2 running, 0 zombie, 0 stopped
CPU states:  1.1% user,  0.3% system,  0.0% nice, 98.4% idle
Mem:  257332K av,  73340K used, 183992K free,  60052K shrd,   6736K buff
Swap: 240964K av,      0K used, 240964K free                 43132K cached


after 4 hours
  2:53pm  up  4:00,  2 users,  load average: 0.00, 0.00, 0.00
58 processes: 57 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  0.1% user,  1.1% system,  0.0% nice, 98.6% idle
Mem:  257332K av,  81652K used, 175680K free,  51420K shrd,  10616K buff
Swap: 240964K av,      0K used, 240964K free                 47864K cached


after 6:30
  5:25pm  up  6:32,  2 users,  load average: 0.00, 0.00, 0.00
57 processes: 56 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  0.3% user,  0.7% system,  0.0% nice, 98.8% idle
Mem:  257332K av,  91472K used, 165860K free,  49388K shrd,  16844K buff
Swap: 240964K av,      0K used, 240964K free                 50712K cached




I try to figure out how this is working... I'm stumped.
Any comment?

Thanks,

alexis




Reply to: