LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-02-2011, 03:52 AM   #1
keevill
LQ Newbie
 
Registered: Dec 2009
Posts: 28

Rep: Reputation: 0
Squid keeps needing to be restarted how to troubleshoot ?


I have been running squid3 proxy on a Ubuntu 10.04 machine for several months with no problems.It serves about 50 users ( win and Lin clients ) and is usually rock solid.
However, over the last few days problems occur.
The users lose connection and I have to restart squid and all is ok again. Sometimes it drops 4-5 times in an hour ans sometimes not for 6 hours or more. I know the problem is related to Squid as the actual internet connection is on and the squid machine can access the internet.
Restarting squid cures the problem.
How can I troubleshoot this ?

Checking the cache.log doesn't show anything strange as far as I can see.
Could it be that the cache file is full or something ?
I am not really very good with this program and look for help here from someone more knowledgeable.
Many thx,
-keevill-
 
Old 06-03-2011, 03:03 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well you could start by loking at the log files, and also run it in the foreground, not as a service.

Nothing to do with Networking. Moved to Linux - Server.
 
1 members found this post helpful.
Old 06-03-2011, 10:50 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,331

Rep: Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089
Quote:
Originally Posted by keevill View Post
I have been running squid3 proxy on a Ubuntu 10.04 machine for several months with no problems.It serves about 50 users ( win and Lin clients ) and is usually rock solid.
However, over the last few days problems occur.
The users lose connection and I have to restart squid and all is ok again. Sometimes it drops 4-5 times in an hour ans sometimes not for 6 hours or more. I know the problem is related to Squid as the actual internet connection is on and the squid machine can access the internet.
Restarting squid cures the problem.
How can I troubleshoot this ?

Checking the cache.log doesn't show anything strange as far as I can see.
Could it be that the cache file is full or something ?
I am not really very good with this program and look for help here from someone more knowledgeable.
Many thx,
-keevill-
Agree with acid_kewpie on that. The Squid log files would be the best place to look. And since you're restarting it often, if you run it on a terminal window and keep it in the foreground, you'll see any messages that are there, before it dies/locks. However, be sure you set your scrollback buffer VERY high, just in case you miss something.

Once you get a little more info, it should be easier to diagnose. Also, you say it's been running fine for several months. The obvious next question is "what changed?" Any updates get run? Any new employees who may be wanna-be script kiddies? New browser updates?
 
Old 06-03-2011, 08:06 PM   #4
keevill
LQ Newbie
 
Registered: Dec 2009
Posts: 28

Original Poster
Rep: Reputation: 0
I did say that I checked the cache.log files and can find nothing other than the restart dialogues - no hint what might be going wrong.
However, I have now concluded that the restart is needed when/if the Internet connection drops. The ADSL modem autoreconnects normally but squid3 needs a restart.I guess some days, the connection is unreliable and therefore makes it more evident that squid needs poking.
Could there be something needed in the conf file to make it reconnect automatically ?

I tried to add server_persistent_connections_on to the conf file but I get the 'unrecognized'error message when I try to reconfigure squid.

Thx,
-keevill-

Last edited by keevill; 06-03-2011 at 10:11 PM. Reason: additional info
 
Old 06-04-2011, 12:25 PM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,331

Rep: Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089
Quote:
Originally Posted by keevill View Post
I did say that I checked the cache.log files and can find nothing other than the restart dialogues - no hint what might be going wrong.
However, I have now concluded that the restart is needed when/if the Internet connection drops. The ADSL modem autoreconnects normally but squid3 needs a restart.I guess some days, the connection is unreliable and therefore makes it more evident that squid needs poking.
Could there be something needed in the conf file to make it reconnect automatically ?

I tried to add server_persistent_connections_on to the conf file but I get the 'unrecognized'error message when I try to reconfigure squid.
There are more log files that just the cache.log:
http://wiki.squid-cache.org/SquidFaq/SquidLogs

Not sure what to put in to make it auto-reconnect after an Internet drop...have never had that particular problem. You *COULD* write a simple shell script to ping an Internet resource (like www.google.com), and if it's not found, stop/start Squid automatically.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to tell who or what restarted a server anon091 Linux - Newbie 3 10-02-2010 11:27 PM
[SOLVED] Computer restarted itself, Why? rhjp Linux - Software 3 09-16-2010 05:22 AM
NMB service fails on boot, needing to be restarted manually. zero-x Linux - Networking 0 03-29-2009 10:18 PM
syslogd restarted talat Linux - Software 2 01-03-2007 06:30 AM
New help restarted httpd oadvantage Linux - Newbie 2 09-10-2006 01:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration