Re: [Hampshire] Troubleshooting Memory Leak

Top Page

Reply to this message
Author: Stuart Matheson
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Troubleshooting Memory Leak
Hey Stephen,

Not sure if this applies to Linux operating systems or not but I had
something similar happening under XP at work. Turns out a call was being
made to the OS which was then malloc'ing some memory that the application
was meant to free when it was finished with it. The memory allocated was not
listed against the application though (as the OS had done the malloc) so it
was a bit tough to track down.

Just something else to look out for, HTH.

Stu

2009/3/24 Stephen Nelson-Smith <sanelson@???>

> I have a CentOS 5 server running nginx, httpd and a dozen or so
> mongrel instances. Since this morning I've been experiencing a
> serious memory leak - about 2G in 2 hours, until the machine needs to
> be rebooted. I've tried to answer the question "what changed", and I
> can't think of anything on my side...
>
> In top, and related tools, I see no processes growing in size - all I
> see is the amount of memory available constantly reducing.
>
> The sort of thing I can think of that fits the evidence would be
> something like a process is being created and then dying without
> returning the memory to the system.
>
> However, I am unable to see the malloc's, and I can't currently think
> of a way to test this theory.
>
> I suspect systemtap may be the tool to use - anyone have experience of
> using it in this way, or have a recipe they could point me to?
>
> Any other ideas for troubleshooting and gathering info?
>
> Thanks in advance,
>
> S.
>
> --
> Stephen Nelson-Smith
> Technical Director
> Atalanta Systems Ltd
> www.atalanta-systems.com
>
> --
> Please post to: Hampshire@???
> Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
> LUG URL: http://www.hantslug.org.uk
> --------------------------------------------------------------
>