[squid-users] high CPU usage

From: c.murdock <cmurdock@dont-contact.us>
Date: Tue, 3 Dec 2002 16:41:09 -0500

Hello list,

I'm using squid 2.5.PRE7 on an OpenBSD 3.1 system, and we're having problems
with it using up about 99% of the cpu at times. When this happens we can't
get to the Internet; it just continually tries to connect, and eventually
times out. The last time it happened was this morning. We're also having
problems with this system crashing into debugging mode with uvm-related
messages, and I'm wondering if it's connected to this somehow. Yesterday
afternoon the system crashed, and I rebooted it, so it hadn't been up for too
long when I discovered this morning that squid was taking up the whole CPU.
Instead of rebooting, I decided to replace it with another machine with
almost the same setup (OpenBSD 3.1, but squid 2.5.PRE5), and upon booting it,
I started top and found that squid was taking up 99% of the cpu on this
machine as well!

 I did a 'squid -k shutdown', and it killed all the squid processes except
the one that was taking up the cpu, so I did a kill -9 on it and started
squid again, and the same thing happened immediately. I
watched as the cpu usage steadily increased to 90-some percent. This time I
did a 'squid -k shutdown', looked in top and found that it was still running,
and used top's kill function to kill it (which in this version of top
defaults to the equivalent of 'kill -15') and it refreshed itself, and went
down to 0% and stayed there. Everything is working fine now, and squid's CPU
usage has remained at around 0% all day. I've read the faq, and /dev/null is
definitely there, and none of the filesystems seem to be mounted with the
nodev option on the 2nd machine, but on the 1st machine /tmp is. I don't
think it's a regex problem, as I only have one dstdom_regex with a list of
about 20 urls and a couple of regular expressions. I've scoured the mailing
list archives and the Internet, but haven't come up with much else. Anyone
have any idea what might be causing this? Below is my config file and
compile options:

router# squid -v
Squid Cache: Version 2.5.PRE5
configure options: '--enable-removal-policies=lru heap'
'--enable-storeio=ufs diskd' --datadir=/usr/local/share/squid
--localstatedir=/var/squid --prefix=/usr/local --sysconfdir=/etc/squid

(The system with 2.5.PRE7 has the exact same options. They were both
installed from OpenBSD's ports collection, and I think that's the default
configuration.)

squid.conf:
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 32 MB
cache_dir ufs /var/squid/cache 7000 16 256
cache_store_log none
redirect_program /usr/local/bin/squidGuard -c
/usr/local/squidGuard/squidGuard.conf
redirect_children 5
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 SSL_ports port 443 563
acl Safe_ports port 8080 80 21 443 563 70 210 1025-65535
acl CONNECT method CONNECT
acl allowed_clients src 192.168.1.1-192.168.1.240/255.255.255.255
acl non_restricted_clients ident nobody m1 m2 m3 m4 m5 cindy muffin test
test2 admin
acl restricted_clients ident pw1 pw2
acl search_urls dstdom_regex "/etc/squid/data/urls.power"
acl search_ips dst "/etc/squid/data/ips.power"
# --The next 4 lines are to keep from caching accesspa ill requests.
acl accesspa_server dstdomain 205.247.101.11
always_direct allow accesspa_server
acl vdx_ill_server dstdomain 205.247.101.10
always_direct allow vdx_ill_server
acl yahoo dstdomain yahoo.com
always_direct allow yahoo
acl yahoo-chat dstdomain chat.yahoo.com
always_direct allow yahoo-chat
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow allowed_clients
http_access allow localhost
http_access allow non_restricted_clients
http_access allow restricted_clients search_urls
http_access allow restricted_clients search_ips
http_access deny all
miss_access allow all
cache_mgr root
cache_effective_user squid
cache_effective_group squid
logfile_rotate 3

Thanks much for your help! Apologies for the length of this post!

-- 
Cindy Murdock
Network Administrator
Meadville Public Library/Crawford County Federated Library System
http://meadvillelibrary.org & http://ccfls.org
Received on Tue Dec 03 2002 - 14:41:16 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:11:50 MST