Re: [squid-users] Automatic restart squid when response time is too large

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sat, 11 Feb 2006 13:24:48 +0100 (CET)

On Tue, 17 Jan 2006, Joost de Heer wrote:

> One of our proxies has a problem which causes the response time to explode.
> We've been unable to find a cause for this behaviour, but I want to implement
> a workaround: when the median response time grows over 1 second (normal
> behaviour is a median response time of about 100/110ms) I want to
> automatically restart the proxy.

It's better to spend some time on identifying why this happens. Would give
you a much more precise tool on when Squid needs to be restarted.

Possible causes

   - Memory shortage. Montior with vmstat/sar.

   - I/O bottleneck. Monitor with vmstat/iostat/sar.

   - Overload. Monitor CPU usage with vmstat/iostat/sar, and filedescriptor
usage in Squid using snmp polling. Also keep an eye on cache.log.

> Does anyone have something like this already implemented

I have a similar thing.. restarting Squid if the event loop takes longer
than X seconds to complete. Not exacly what you ask for.

> or do I need to write my own script that does this? I'd hate reinventing
> the wheel, since I'm not really a script builder....

To do exacly what you ask for you probably have to write your own script.

Regards
Henrik
Received on Sat Feb 11 2006 - 05:24:52 MST

This archive was generated by hypermail pre-2.1.9 : Wed Mar 01 2006 - 12:00:03 MST