RE: Apache memory hog

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

 



Hi Tom,

We can run some tests.  I have a VMware "clone" of the server that I can
use for testing.  Its basically a mondoarchive backup/restore, so config
should be 100%, and I can test most things in it. Hardwares obviously
different, and I cant emulate 12Gb of ram, but I can at least get 1Gb on
it again.

I used the yum RPM version that Redhat supplied. Next week I'll try some
other things, like putting the latest (non-redhat) RPM on there, and
maybe read up a little on what your asking - as right now I've no clue.

I'll also see if the MaxMemFree helps out at 1Mb.

Adrian


-----Original Message-----
From: Tom Evans [mailto:tevans.uk@xxxxxxxxxxxxxx] 
Sent: 03 April 2009 16:21
To: users@xxxxxxxxxxxxxxxx
Subject: RE:  Apache memory hog

On Fri, 2009-04-03 at 14:24 +0100, Adrian Marsh wrote:
> Hi Tom,
> 
> Well, at the moment the servers running very low on available memory:
> 
> Mem:  12307068k total, 12121380k used,   185688k free,   286808k
buffers
> Swap:  2031608k total,        0k used,  2031608k free, 11081692k
cached
> 
> Hence my original question #3, on where the memorys going after httpd
is
> stopped/started (via a normal init.d stop/start).
> 
> Yet none of that 12gb seems to be allocated anywhere. The processes
> listed below are sorted by max usage.  Since my last email (10mins?)
> httpd has grown to:
> 
> 10002 apache    15   0  297m  35m 5024 S  0.0  0.3   0:02.17 httpd
> 10007 apache    15   0  296m  33m 4864 S  0.0  0.3   0:01.11 httpd
> 10003 apache    16   0  295m  32m 5164 S  0.0  0.3   0:00.60 httpd
> 10005 apache    15   0  295m  32m 4952 S  0.0  0.3   0:00.99 httpd
> 10006 apache    15   0  295m  32m 5012 S  0.0  0.3   0:01.02 httpd
> 10000 apache    15   0  294m  31m 5256 S  0.0  0.3   0:01.42 httpd
>  4226 mysql     15   0  257m  31m 4264 S  0.0  0.3   9:31.30 mysqld
> 10001 apache    15   0  290m  27m 5228 S  0.0  0.2   0:00.48 httpd
> 10004 apache    15   0  289m  27m 5144 S  0.0  0.2   0:00.25 httpd
> 
> To get that memory back I have to reboot the server.
> 
> The yum update did change a number of core packages yes.  I'd tested
it
> for a few weeks in a VMWARE virtual machine, to check functionality,
but
> hadn't realized that it might even cause the issues we see now with
> regards to memory.
> 
> Is there anyway to dig into the memory usage within those httpd
> processes?
> 
> 

Hmmm, that does look like a memory leak indeed. As this is production, I
guess we can't run too many tests? It would be useful to rebuild apache
with debug symbols, see if you can still reproduce the leak. If you can,
perhaps run it under valgrind in single process mode (-X flag to
apache). That would show up where any memory leaks are.

Cheers 

Tom


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux