[squid-users] Question about shutdown_lifetime behavior.

Cody Herzog CHerzog at IntouchHealth.com
Tue May 1 17:17:54 UTC 2018


Thanks very much for the quick response, Amos.

For my use case, I would like Squid to exit when all client connections have been closed or when the timeout occurs, whichever comes first.

My instances of Squid may be handling several persistent WebSocket connections, and I don't want to disrupt those. I will occasionally need to perform maintenance, so I want a safe way to stop Squid without disrupting user activity.

I am using a fairly simple Squid configuration, with no caching, so I suspect that I can simply monitor the number of active Squid TCP connections using 'netstat', and then execute the second shutdown command when I detect that all those connections are closed.

I've been using the following command to count the number of active Squid TCP connections of port 443, which is the only port I use:

netstat -nat | grep ".*:443.*:" | grep ESTABLISHED | wc -l

That seems to give me what I want.

Is it possible that bad things could happen by stopping Squid when I see that all the TCP connections have closed?

Thanks.

-Cody
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20180501/c0b86f39/attachment.html>


More information about the squid-users mailing list