# squid flipping out

## Corona688

I am using squid with a VPN that occasionally and briefly goes down.  Is there a way to get squid to deal with this gracefully instead of flipping out and delivering 404's until rebooted?  Or do I have no choice but to reboot squid every time this happens?

----------

## Corona688

Squid still flipping out even though I wrote scripts that are *supposed* to restart it whenever the VPN blips.

Is there any way to stop it?

----------

## Corona688

squid still flipping out.  I'm having to watch my servers like a hawk.  I can't keep this up all christmas...

----------

## Corona688

Three times today squid flipped out and refused to deliver traffic anymore!   :Very Happy:   :Very Happy:   :Very Happy:   It just stops talking to its cache parent even though nothing prevents their communication.

----------

## luispa

What do you mean by flipping out (crashing? sorry but my english is not perfect) ?.

I understand: when connectivity goes down (towards the web server) and recovers the squid is not recovering itself and keep thinking the connection is still down, right?.

If so, maybe there is a timeout parameter or similar inside its configuration. I've got squid serving my lan computers and if I put down and later up the WAN interface I don't see this behaviour, but sure is a different setup (I'm using it in transparent mode w/ iptables). 

Luis

----------

## Corona688

See my first message:  It delivers nothing but 404's at all ever again until rebooted.

it's still at it today!  I woke to 404's and screaming customers!   :Very Happy:   :Very Happy:   :Very Happy: 

I didn't see anything odd in cache.log but have it anyway:

```
|         0 Objects expired.

2009/12/06 09:47:00|         0 Objects cancelled.

2009/12/06 09:47:00|         0 Duplicate URLs purged.

2009/12/06 09:47:00|         0 Swapfile clashes avoided.

2009/12/06 09:47:00|   Took 3.1 seconds (23692.6 objects/sec).

2009/12/06 09:47:00| Beginning Validation Procedure

2009/12/06 09:47:00|   Completed Validation Procedure

2009/12/06 09:47:00|   Validated 73352 Entries

2009/12/06 09:47:00|   store_swap_size = 1474532k

2009/12/06 09:47:01| storeLateRelease: released 0 objects

2009/12/06 09:47:04| icmpSend: send: (111) Connection refused

2009/12/06 09:47:04| Closing Pinger socket on FD 14

2009/12/05 17:57:33| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec

2009/12/05 17:57:33| Store logging disabled

2009/12/05 17:57:33| Rebuilding storage in /var/cache/squid (CLEAN)

2009/12/05 17:57:33| Using Least Load store dir selection

2009/12/05 17:57:33| Set Current Directory to /var/cache/squid

2009/12/05 17:57:33| Loaded Icons.

2009/12/05 17:57:34| Accepting proxy HTTP connections at 127.0.0.1, port 3128, FD 11.

2009/12/05 17:57:34| Accepting accelerated HTTP connections at 192.168.17.1, port 3128, FD 12.

2009/12/05 17:57:34| Accepting ICP messages at 0.0.0.0, port 3130, FD 13.

2009/12/05 17:57:34| HTCP Disabled.

2009/12/05 17:57:34| WCCP Disabled.

2009/12/05 17:57:34| Pinger socket opened on FD 14

2009/12/05 17:57:34| Configuring Parent 10.0.0.1/3128/3120

2009/12/05 17:57:34| Ready to serve requests.

2009/12/05 17:57:34| Store rebuilding is  5.6% complete

2009/12/05 17:57:36| Done reading /var/cache/squid swaplog (72629 entries)

2009/12/05 17:57:36| Finished rebuilding storage from disk.

2009/12/05 17:57:36|     72629 Entries scanned

2009/12/05 17:57:36|         0 Invalid entries.

2009/12/05 17:57:36|     72629 Entries scanned

2009/12/05 17:57:36|         0 Invalid entries.

2009/12/05 17:57:36|         0 With invalid flags.

2009/12/05 17:57:36|     72629 Objects loaded.

2009/12/05 17:57:36|         0 Objects expired.

2009/12/05 17:57:36|         0 Objects cancelled.

2009/12/05 17:57:36|         0 Duplicate URLs purged.

2009/12/05 17:57:36|         0 Swapfile clashes avoided.

2009/12/05 17:57:36|   Took 2.6 seconds (27848.5 objects/sec).

2009/12/05 17:57:36| Beginning Validation Procedure

2009/12/05 17:57:36|   Completed Validation Procedure

2009/12/05 17:57:36|   Validated 72629 Entries

2009/12/05 17:57:36|   store_swap_size = 1447080k

2009/12/05 17:57:36| storeLateRelease: released 0 objects

2009/12/05 17:57:50| icmpSend: send: (111) Connection refused

2009/12/05 17:57:50| Closing Pinger socket on FD 14

2009/12/05 17:59:52| WARNING: 1 swapin MD5 mismatches

2009/12/05 18:37:34| NETDB state saved; 0 entries, 0 msec

2009/12/05 18:58:11| parseHttpRequest: Requestheader contains NULL characters

2009/12/05 18:37:34| NETDB state saved; 0 entries, 0 msec

2009/12/05 18:58:11| parseHttpRequest: Requestheader contains NULL characters

2009/12/05 18:58:11| parseHttpRequest: Unsupported method '^C'

2009/12/05 18:58:11| clientReadRequest: FD 16 (192.168.17.38:61287) Invalid Request

2009/12/05 19:24:38| NETDB state saved; 0 entries, 0 msec

2009/12/05 20:25:42| NETDB state saved; 0 entries, 36 msec

2009/12/05 21:38:57| NETDB state saved; 0 entries, 0 msec

2009/12/05 22:41:11| NETDB state saved; 0 entries, 0 msec

2009/12/05 23:21:57| NETDB state saved; 0 entries, 0 msec

2009/12/06 00:12:03| NETDB state saved; 0 entries, 0 msec

2009/12/06 01:13:18| NETDB state saved; 0 entries, 0 msec

2009/12/06 02:16:28| parseHttpRequest: Unsupported method 'A^GS^Üa^^û^D,ë^ß^×õ^Û

'

2009/12/06 02:16:28| clientReadRequest: FD 16 (192.168.17.30:3989) Invalid Request

2009/12/06 02:28:45| NETDB state saved; 0 entries, 0 msec

2009/12/06 03:13:29| NETDB state saved; 0 entries, 0 msec

2009/12/06 04:20:39| NETDB state saved; 0 entries, 0 msec

2009/12/06 05:05:42| NETDB state saved; 0 entries, 0 msec

2009/12/06 06:12:25| NETDB state saved; 0 entries, 0 msec

2009/12/06 05:05:42| NETDB state saved; 0 entries, 0 msec

2009/12/06 06:12:25| NETDB state saved; 0 entries, 0 msec

2009/12/06 06:16:27| parseHttpRequest: Unsupported method '^W-¡Ã^Ý»^BC¶6Ë

'

2009/12/06 06:16:27| clientReadRequest: FD 16 (192.168.17.30:4092) Invalid Request

2009/12/06 06:55:24| NETDB state saved; 0 entries, 0 msec

2009/12/06 07:53:58| NETDB state saved; 0 entries, 0 msec

2009/12/06 08:40:22| storeLocateVary: Not our vary marker object, F617F5402D4FB09D207D95EA71AF9978 = 'http://static.ak.fbcdn.net/connect.php/css/share-button-css', 'accept-enco$

2009/12/06 08:57:25| NETDB state saved; 0 entries, 0 msec

2009/12/06 09:46:54| Preparing for shutdown after 15445 requests

2009/12/06 09:46:54| Waiting 1 seconds for active connections to finish

2009/12/06 09:46:54| FD 11 Closing HTTP connection

2009/12/06 09:46:54| FD 12 Closing HTTP connection

2009/12/06 09:46:56| Shutting down...

2009/12/06 09:46:56| FD 13 Closing ICP connection

2009/12/06 09:46:56| Closing unlinkd pipe on FD 10

2009/12/06 09:46:56| storeDirWriteCleanLogs: Starting...

2009/12/06 09:46:56|     65536 entries written so far.

2009/12/06 09:46:56|   Finished.  Wrote 73352 entries.

2009/12/06 09:46:56|     65536 entries written so far.

2009/12/06 09:46:56|   Finished.  Wrote 73352 entries.

2009/12/06 09:46:56|   Took 0.1 seconds (492616.0 entries/sec).

CPU Usage: 139.105 seconds = 63.496 user + 75.609 sys

Maximum Resident Size: 0 KB

Page faults with physical i/o: 3

Memory usage for squid via mallinfo():

        total space in arena:   53104 KB

        Ordinary blocks:        52992 KB     80 blks

        Small blocks:               0 KB      5 blks

        Holding blocks:           244 KB      1 blks

        Free Small blocks:          0 KB

        Free Ordinary blocks:     111 KB

        Total in use:           53236 KB 100%

        Total free:               111 KB 0%

2009/12/06 09:46:56| Squid Cache (Version 2.6.STABLE13): Exiting normally.

2009/12/06 09:46:57| Starting Squid Cache version 2.6.STABLE13 for i686-pc-linux-gnu...

2009/12/06 09:46:57| Process ID 22048

2009/12/06 09:46:57| With 1024 file descriptors available

2009/12/06 09:46:57| Process ID 22048

2009/12/06 09:46:57| With 1024 file descriptors available

2009/12/06 09:46:57| Using epoll for the IO loop

2009/12/06 09:46:57| DNS Socket created at 0.0.0.0, port 3984, FD 5

2009/12/06 09:46:57| Adding nameserver 192.168.17.1 from /etc/resolv.conf

2009/12/06 09:46:57| Adding nameserver 208.70.0.8 from /etc/resolv.conf

2009/12/06 09:46:57| Adding nameserver 4.2.2.2 from /etc/resolv.conf

2009/12/06 09:46:57| Adding nameserver 66.82.4.8 from /etc/resolv.conf

2009/12/06 09:46:57| User-Agent logging is disabled.

2009/12/06 09:46:57| Referer logging is disabled.

2009/12/06 09:46:57| Unlinkd pipe opened on FD 10

2009/12/06 09:46:57| Swap maxSize 1638400 KB, estimated 126030 objects

2009/12/06 09:46:57| Target number of buckets: 6301

2009/12/06 09:46:57| Using 8192 Store buckets

2009/12/06 09:46:57| Max Mem  size: 65536 KB

2009/12/06 09:46:57| Max Swap size: 1638400 KB

2009/12/06 09:46:57| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec

2009/12/06 09:46:57| Store logging disabled

2009/12/06 09:46:57| Rebuilding storage in /var/cache/squid (CLEAN)

2009/12/06 09:46:57| Store logging disabled

2009/12/06 09:46:57| Rebuilding storage in /var/cache/squid (CLEAN)

2009/12/06 09:46:57| Using Least Load store dir selection

2009/12/06 09:46:57| Set Current Directory to /var/cache/squid

2009/12/06 09:46:57| Loaded Icons.

2009/12/06 09:46:58| Accepting proxy HTTP connections at 127.0.0.1, port 3128, FD 11.

2009/12/06 09:46:58| Accepting accelerated HTTP connections at 192.168.17.1, port 3128, FD 12.

2009/12/06 09:46:58| Accepting ICP messages at 0.0.0.0, port 3130, FD 13.

2009/12/06 09:46:58| HTCP Disabled.

2009/12/06 09:46:58| WCCP Disabled.

2009/12/06 09:46:58| Pinger socket opened on FD 14

2009/12/06 09:46:58| Configuring Parent 10.0.0.1/3128/3120

2009/12/06 09:46:58| Ready to serve requests.

2009/12/06 09:46:58| Store rebuilding is  5.6% complete

2009/12/06 09:47:00| Done reading /var/cache/squid swaplog (73352 entries)

2009/12/06 09:47:00| Finished rebuilding storage from disk.

2009/12/06 09:47:00|     73352 Entries scanned

2009/12/06 09:47:00|         0 Invalid entries.

2009/12/06 09:47:00|         0 With invalid flags.

2009/12/06 09:47:00|         0 Invalid entries.

2009/12/06 09:47:00|         0 With invalid flags.

2009/12/06 09:47:00|     73352 Objects loaded.

2009/12/06 09:47:00|         0 Objects expired.

2009/12/06 09:47:00|         0 Objects cancelled.

2009/12/06 09:47:00|         0 Duplicate URLs purged.

2009/12/06 09:47:00|         0 Swapfile clashes avoided.

2009/12/06 09:47:00|   Took 3.1 seconds (23692.6 objects/sec).

2009/12/06 09:47:00| Beginning Validation Procedure

2009/12/06 09:47:00|   Completed Validation Procedure

2009/12/06 09:47:00|   Validated 73352 Entries

2009/12/06 09:47:00|   store_swap_size = 1474532k

2009/12/06 09:47:01| storeLateRelease: released 0 objects

2009/12/06 09:47:04| icmpSend: send: (111) Connection refused

2009/12/06 09:47:04| Closing Pinger socket on FD 14
```

----------

