The squid (2.7) proxy that I have running on ubuntu 8.10 stops accepting new requests after being online for a while, due to reasons that I can't discover. However doing a squid -k reconfigure
resolves the problem immediately.
Now I manually run this command by monitoring the log and if i don't see any activity for 5 minutes I reload the config.
Now on my quest for a solution I had several ideas:
- diagnose the root cause and eliminate it
- setup a script to automatically reload script if no new entries in access.log for the past 3 minutes
- painstakingly upgrade server to newer ubuntu version while keeping network offline or during off hours to minimize downtime.
I turn to you for solutions to option 2), as I do not understand squid enough for 1), and I'm avoiding 3) as long as i can. Any ideas?
Best Answer
I've come across a similar behaviour in squid (this was about 5 years ago - never got to the bottom of it) but in my case it would start slowing down after being up for 2-3 days.
Something like this run from cron should give the required behaviour for it locking up completely (assuming it stops writing to the log files):
This needs to run as root - so either in the root crontab, or the system crontab...
(note you should not edit the crontab file in place - use crontab -l >copy_ctb to get a copy of the current crontab, edit it, then load the new config using crontab copy_ctb)