Re: [squid-users] Slow memory leak

From: <tcr_at_raynersw.com>
Date: Wed, 26 Sep 2012 15:51:04 -0700

> did you tune the tcp timing on the machine? time_wait? close ? etc...
No, tcp timing is CentOS default which should be fine for a server at this utilization

> the timeout can be really off the chart sometimes leaving you with hundreds if not K's of connections open for a reason and will make things stuck in memeory.
That would not account for squid's slow accumulation of memory over the course of days.

> since your squid dosnt crash and just ran out of memory and since you dont have cache_mem specific directive in you settings I think it's using the basic 256MB which will not benefit you that much for a mem only cache.
It will crash if I let it. And it did crash before I found the leak and put in a watchdog. Now I just restart it before it starts eating into swap.

> how much ram do you have on that machine?

Different machines, 8 GB minimum 32 GB max.

Thanks for the GDB wiki, I will use that along with the valgrind one from Amos.

On Sep 26, 2012, at 3:41 PM, Eliezer Croitoru <eliezer_at_ngtech.co.il> wrote:

> On 9/27/2012 12:13 AM, tcr_at_raynersw.com wrote:
>> Just wish I had some squid development experience so I could easily get into a debugging environment and track this down... but squid's a big package and I know there will be a big learning curve to start debugging builds.
>>
>> Thanks
>> -Ty
> you dont jump into debugging some problem until you confirm there are not other culprits around the corner.
>
> it's not just the amount of file-descriptors but maybe some of this memory squid is using actually is from things like open FD\connections etc.
>
> did you tune the tcp timing on the machine? time_wait? close ? etc...
>
> The systems I have seen was using Gentoo 64 bit and Ubuntu 10.04LTS 64 bit.
>
> you are assuming that things are not the problem and you can try to first change this since you are at the "Unknown" area yet.
>
> you can try to take a look at the FD thing at first and it will look like "ok everything is fine and i'm not running out of them" but there are many things you need to take in account.
>
> Most basic linux settings of sockets are not well tuned.
> the timeout can be really off the chart sometimes leaving you with hundreds if not K's of connections open for a reason and will make things stuck in memeory.
> else then mgr:info did you take a look at mgr:mem? which is a more detailed data on this specific subject.
> take a look at:
> http://wiki.squid-cache.org/SquidFaq/BugReporting#Using_gdb_debugger_on_a_live_proxy_.28with_minimal_downtime.29
>
> which will help you get debug data.
>
> since your squid dosnt crash and just ran out of memory and since you dont have cache_mem specific directive in you settings I think it's using the basic 256MB which will not benefit you that much for a mem only cache.
>
> how much ram do you have on that machine?
>
> Eliezer
Received on Wed Sep 26 2012 - 22:51:05 MDT

This archive was generated by hypermail 2.2.0 : Thu Sep 27 2012 - 12:00:13 MDT