Re: [squid-users] Squid flushcache doesn't complete shutdown / exit normally

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 31 Dec 2011 15:00:49 +1300

On 31/12/2011 6:22 a.m., storm_m2138 wrote:
> Hello,
>
> Each day we clear our Squid cache using:
>
> /etc/init.d/squid flushcache
>
> Normally when we do this we see an output similar to this in cache.log
> (notice the SHutting down...) --
>
>
> 2011/12/30 06:30:01| Preparing for shutdown after 375039 requests
> 2011/12/30 06:30:01| Waiting 30 seconds for active connections to finish
> 2011/12/30 06:30:01| FD 19 Closing HTTP connection
> 2011/12/30 06:30:32| Shutting down...
> 2011/12/30 06:30:32| FD 20 Closing ICP connection
> 2011/12/30 06:30:32| Closing unlinkd pipe on FD 17
> 2011/12/30 06:30:32| storeDirWriteCleanLogs: Starting...
> 2011/12/30 06:30:32| 65536 entries written so far.
> 2011/12/30 06:30:32| 131072 entries written so far.
> 2011/12/30 06:30:32| 196608 entries written so far.
> 2011/12/30 06:30:32| 262144 entries written so far.
> 2011/12/30 06:30:32| Finished. Wrote 297317 entries.
> 2011/12/30 06:30:32| Took 0.2 seconds (1657932.3 entries/sec).
> CPU Usage: 597.807 seconds = 310.054 user + 287.753 sys
> Maximum Resident Size: 0 KB
> Page faults with physical i/o: 0
> Memory usage for squid via mallinfo():
> total space in arena: 260748 KB
> Ordinary blocks: 259972 KB 9562 blks
> Small blocks: 0 KB 5 blks
> Holding blocks: 416 KB 2 blks
> Free Small blocks: 0 KB
> Free Ordinary blocks: 775 KB
> Total in use: 260388 KB 100%
> Total free: 776 KB 0%
> 2011/12/30 06:30:32| Squid Cache (Version 2.6.STABLE17): Exiting normally.
> 2011/12/30 06:30:33| Starting Squid Cache version 2.6.STABLE17 for
> i686-redhat-linux-gnu
> ...
>
>
>
> For the last few days, however, it seems that the flushcache command isn't
> doing the same thing that it used to do. Now, when we run this same command,
> we don't see the "Shutting Down..." in the log file. Additionally, the tool
> that we use to monitor Squid's cache is reporting that the cache isn't being
> cleared. Here is the new log output (much shorter):
>
>
> 2011/12/30 06:30:01| Preparing for shutdown after 2098091 requests
> 2011/12/30 06:30:01| Waiting 30 seconds for active connections to finish
> 2011/12/30 06:30:01| FD 19 Closing HTTP connection
> 2011/12/30 06:30:20| Starting Squid Cache version 2.6.STABLE17 for
> i686-redhat-linux-gnu...
>
>
> Possible solutions we are considering are doing a manual shutdown / cache
> clear or increasing the amount of time Squid waits for active connections to
> close.
>
> Any insights / suggestions appreciated.

What makes you think clearing the cache is happening? Part of the
purpose of the cache is to stay there between restarts, Squid *does not*
erase it on shutdown. What you see there in the first case is Squid
writing its memory data out to the disk for reload during a later startup.

As for the change, it appears to be something outside of Squid (the
version did not change). What can you identify has changed? the RHEL
point release? something in the traffic? disks? amount of data on the
disks? could be anything. Most likely to be squid crashing for some
reason on shutdown doing all those memory and disk ops.

Amos
Received on Sat Dec 31 2011 - 02:01:00 MST

This archive was generated by hypermail 2.2.0 : Sat Dec 31 2011 - 12:00:02 MST