LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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-25-2009, 06:49 AM   #1
adityanag
LQ Newbie
 
Registered: Sep 2004
Posts: 8

Rep: Reputation: 0
Squid time out every day at 4 PM


Hi,

I'm running a server on Centos 4, that provides Squid, DHCP, and DNS. Nothing fancy, just a standard gateway machine. There are only about 50 clients behind it.

We have a 2 Mbps leased line.

Now, everything works fine.. till 4 PM (1600 hrs). Suddenly, the net connection slows down a lot, and browsing becomes really bad. If I use wget to start a direct download from the gateway, I get full speeds (220 KBps), so it's not an upstream problem.

I have looked at crontab, cron.d and there is nothing in there that should cause Squid to timeout. Cron.daily is set to default at 4 AM, not PM, and I haven't changed anything in this.

After about 45 minutes, the net works fine again.

I have run a tail -f on /var/log/messages. Nothing shows up

I also ran a tail -f on /var/log/squid/cache.log. Nothing shows up.

Any ideas? What am I missing? It's driving me batty. I'll be happy to provide more information as required. O Squid gurus, help!

Here's my squid.conf
-------

http_port 3128
#We recommend you to use the following two lines.
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 640 MB
#Suggested default:
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
dns_nameservers 192.168.1.4 208.67.222.222 208.67.220.220 202.138.103.100 202.138.96.3
#Recommended minimum configuration:
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
### Added extra
acl lan src 192.168.1.0/255.255.255.0
acl allow_host src 192.168.1.10
acl allow_host src 192.168.1.178
http_access allow allow_host
#### END
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
cache_dir aufs /var/spool/squid 4000 16 256
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports
# And finally deny all other access to this proxy
http_access allow localhost
# Block all porn sites.....
acl porn url_regex "/etc/squid/porn.txt"
acl noporn url_regex "/etc/squid/noporn.txt"
#acl porn url_regex "/etc/squid/porn.txt"
http_access allow noporn
http_access deny porn
####END
### Enable below once inetrnet is up and disable above ####
http_access allow lan
http_access deny all
# and finally allow by default
http_reply_access allow all
visible_hostname firewall
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
 
Old 06-25-2009, 07:36 AM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Hi.

Install 'iftop', then run it when the connection's going slow. You should be ably to see what's hogging your bandwidth from there.

Dave
 
Old 06-25-2009, 07:39 AM   #3
chitambira
Member
 
Registered: Oct 2008
Location: Online
Distribution: RHEL, Centos
Posts: 373
Blog Entries: 1

Rep: Reputation: 51
need to increase number of file descriptors in most cases.
 
Old 06-25-2009, 08:36 AM   #4
adityanag
LQ Newbie
 
Registered: Sep 2004
Posts: 8

Original Poster
Rep: Reputation: 0
I don't think it's file descriptors..

File descriptor usage for squid:
Maximum number of file descriptors: 1024
Largest file desc currently in use: 115
Number of file desc currently in use: 46
Files queued for open: 0
Available number of file descriptors: 978
Reserved number of file descriptors: 100
Store Disk files open: 0

I would think this is ok, right? Even at peak load, it always has at least 300 file descriptors free. Is this enough?

"Install 'iftop', then run it when the connection's going slow. You should be ably to see what's hogging your bandwidth from there."

I'll try this tomorrow, and let you know what happening. The thing is though, even when no clients are connected (I've physically disconnected everything except one Apple Mac and tried) the browsing is still dead slow. But direct downloads... they are fast! It's not a DNS issue, cause I have tried OpenDNS and others, and DNS works just fine. Still, I'll give this a shot and let you know what I find.

Thanks for the help so far, and keep it coming, folks! I feel like shooting that damn server sometimes.
 
Old 06-25-2009, 12:20 PM   #5
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Sorry if I'm stating the obvious, but I take it you've checked 'top' when it goes pear-shaped?
 
Old 06-25-2009, 12:23 PM   #6
adityanag
LQ Newbie
 
Registered: Sep 2004
Posts: 8

Original Poster
Rep: Reputation: 0
Yup, checked top. The Squid process uses around 8-12% of CPU, and there's nothing much else running. Memory is mostly free too. I have Cacti graphing CPU and Memory, and both are nowhere near capacity.

Don't worry about stating the obvious, please.. I'm sure this is going to turn out to be a D'oh! moment.. it has that feel about it.
 
Old 06-26-2009, 01:47 AM   #7
adityanag
LQ Newbie
 
Registered: Sep 2004
Posts: 8

Original Poster
Rep: Reputation: 0
Ok, so Iftop is installed and I'm keeping an eye on things. I'm also running Wireshark on another machine, to make sure there's no weird network storms or something like that happening. I'll post results as I get them. Any other tools I could be running?
 
  


Reply



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
Day Specific Access control for Squid Bobbychat Linux - Networking 2 04-04-2011 10:58 AM
bash: time difference and calculate the mid day of the day? frenchn00b Programming 3 05-03-2009 02:03 PM
squid - limited time slot for accessing the internet via squid. shahg_shahg Linux - Server 1 09-20-2008 06:41 AM
squid + bandwidth cutoff at specific times of day avirup dasgupta Linux - Networking 2 09-01-2005 02:42 AM
time of day problem gw1500se Mandriva 9 03-23-2004 09:25 AM

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

All times are GMT -5. The time now is 11:13 PM.

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