Squid process terminates for no apparent reason.
I´m having a problem qith squid.
This never happened before and I´ve been using this Linux machine for about 2 years now. Somehow the squid process terminates and, because of that, internet surfing stops for all the subnet machines. This problem started to happen recently and for no apparent reason. I already stopped redirection to port 3128 (squid´s port) to see if the whole connection had been droppped, but no. Everything worked fine when I stopped the redirection. So the problem really is happening to Squid. Has anybody gone through this problem? |
Have you checked Squid's logs to see if there's any info there? They're usually in /var/log/squid and the log names are access.log, cache.log and store.log. Also, have a look in /var/log/messages and (if you have it) /var/log/syslog.
Have you checked to see if the Squid process has died? Code:
$ ps auxf | grep squid | grep -v grep |
Thanks.
The problem was occuring due to low disk space. The squid logs were huge and my HD is small (2GB). I recently wasn´t able to start the squid process. I cleaned the files touched them to create them again and re-grouped and re-owned the files to squid (system user). Now I was able to start the process. Hopefully it will continue to work as usual. Thank you very much. |
Ok the problems aren't happening anymore. But something is bothering me. Rotations are not working with Squid log files. Consequentially, sooner or later I'll be facing the same problems again.
What should I do to make the logs rotate as usual? Thanks! |
How are you doing it at the moment? I have a box running Squid here (not much load and not many users) that uses the following logrotate config file for Squid:
Code:
/var/log/squid/access.log { |
Yep! My machine is the same. I don´t have many users on the network.
Is that the config file for rotation? Where should I store it. Is it invocated with cron? Thanks! |
Weird thing.
I found an identical configuration file under /etc/logrotate.d/ The problem is that Squid´s log files aren´t rotating. Any help is appreciated. Thanks! |
Have you tried running logrotate with the -d switch (debug mode)? It may give a clue as to what is happening. It's worth checking the status file (default is /var/lib/logrotate/status) to see if the squid logs are there.
Also, in your squid.conf file, do you have the following line? Code:
logfile_rotate 0 |
I just did that and I can see squid is not being activated.
Here is the verbose display of the command: Code:
reading config file /etc/logrotate.conf And here are the lines that refer squid in var/lib/logrotate.status: Code:
logrotate state -- version 2 |
If you're using logrotate you should have logfile_rotate set to 0 - that may fix the problem but I haven't tested a set up where logrotate rotates the logs and the squid tries to rotate the logs (which it will do with a non zero value in logfile_rotate).
|
But I´ll try it anyway!
I´ll wait a week to see if it works. The weird thing is that it was working flawlessly... I don´t even know what trigdered the problem. Suddenly it stopped working. :( |
When Squid first stopped working (after the hard disk became full), did any errors occur? It may be worth running fsck over the partition.
|
Still not working.
And when the problem started, I ran FSCK. Literally at the next boot. |
All times are GMT -5. The time now is 03:25 AM. |