[CentOS] Memory leak - how to investigate

Tue Feb 4 12:53:01 UTC 2014
sjt5atra <sjt5atra at gmail.com>


> On Feb 4, 2014, at 3:46 AM, Jussi Hirvi <listmember at greenspot.fi> wrote:
> 
>> On 3.2.2014 19.58, m.roth at 5-cent.us wrote:
>> That's a*lot*  of apache. Is that really correct? Do you really need that
>> many threads? How heavily is the webserver used?
> 
> Is this a good measure? At least it's exact. :-)
> # du -sh /var/log/httpd
> 261M    /var/log/httpd
> 
> Those logs are rotated with default settings, 5 logs kept. The activity 
> went up recently, when a new, quite complex Wordpress site was launched. 
> That might have a lot to do with the crashes.
> 
>> Also, I see mysql running - does the website use it?
> 
> Many websites on that host use MySQL, yes.
> 
> On 3.2.2014 21.44, Kwan Lowe wrote:
>>> Mem:   1361564k total
>> That doesn't look like a lot of memory.. Possible to
>> add another .5G or so?
> 
> Ok, I added RAM (remember, this is a VM). Now I got
> Mem:   2365180k total
> Swap:  3014648k total
> 
> This might help me some way. My experiences so far indicate that a 
> webserver/nameserver should be ok with 2 gigs RAM plus some swap. I am 
> not sure how much it depends on the amount of traffic.
> 
> - Jussi

Others have mentioned tuning httpd.conf parameters. Problem is apache doesn't give you the math to know what to set those without lots of trial-and-error. The best guide for this math is from F5:
  http://www.f5.com/pdf/deployment-guides/f5-apache-dg.pdf