Search squid archive

Re: Need Urgent Help the CPU load shows 99% for the squid process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/3/22 1:45 AM, Punyasloka Arya wrote:

> I need a quick help regarding the squid process occupying 100% CPU
> showing on the top and becomes slow.
> 
> After starting the squid after 2 to 3 hours it is happening.
> After stopping the squid process it becomes normal.

Your Squid is overloaded (getting too much traffic), misconfigured
(e.g., forwarding loop or insufficient number of descriptors for the
given load), or hitting a bug. Lots of bugs have been fixed since Squid
v3.3 was released, including bugs that could lead to 100% CPU
utilization. Squid v3 has not been officially supported for years.

Your best long-term option is to upgrade, but that may take some
time/effort because your base version is so old.

If you want to troubleshoot this without going through the upgrade, try
figuring out which out of the three cases above you are dealing with.
Here are some hints:

* Grep cache.log for any assertions, errors, warnings, or repeated
messages (other than "running out of filedescriptors" which you already
shared).

* Check whether Squid receives the expected amount of traffic (you may
be able to do that by counting lines in access.log and/or watching
network interface stats).

* Check how many file descriptors Squid actually has. There should be a
message about that in the beginning of cache.log. For example:
2021/12/28 11:58:08| With 1024 file descriptors available

* Think of what has _changed_ in Squid environment since Squid was
running successfully (assuming it was).

* If Squid stops processing new requests, then check whether Squid is
stuck in a loop (using gdb or a similar tool).


HTH,

Alex.




> Squid installed version
> 
> [squid@wcb ~]$  /usr/squid/3.1/sbin/squid -version
> Squid Cache: Version 3.3.3
> configure options:  '--prefix=/usr/squid/3.1/'
> '--enable-storeio=ufs,aufs,diskd'                 
> '--enable-removal-policies=heap,lru' '--enable-delay-pools'
> '--enable-useragent-log' '--enable-referer-log' '--enable-icmp'
> '--enable-cachemgr-hostname=wc.cdotb.ernet.in'
> '--enable-follow-x-forwarded-for' '--disable-ident-lookups'
> '--enable-auth-basic=PAM,NCSA,LDAP' '--sysconfdir=/etc/squid/'
> '--with-default-user=squid' '--with-logdir=/var/log/squid'
> '--with-pidfile=/var/run/squid.pid' '--with-filedescriptors=16384'
> '--with-swapdir=/cache/squid' '--enable-ltdl-convenience'
> 
> HARDWARE       : Fujitsu Celsius Xeon Workstation Intel(R) Xeon(R) CPU
> E5-2690 0 @ 2.90GHz 16CPU 8-Core
> HARDDISK          : 500GB
> RAM                   :24 GB
> OS                       : CentOS 6.10(final)
> 
> 
> The output of the command  after load is 99% in the CPU
> 
> [root@wcb squid]#  tail -n 100000 /var/log/squid/cache.log | grep -i
> descript
> 
> 2022/01/02 11:49:32 kid1| WARNING! Your cache is running out of
> filedescriptors
> 2022/01/02 11:49:48 kid1| WARNING! Your cache is running out of
> filedescriptors
> 2022/01/02 11:50:04 kid1| WARNING! Your cache is running out of
> filedescriptors
> 2022/01/02 11:50:20 kid1| WARNING! Your cache is running out of
> filedescriptors
> 
> Please suggest anything else i should check or missing.
> 
> From
> Punyasloka Arya
> 
> From
> Punya
> PUNYASLOKA ARYA            पुण्यश्लोक आर्या
> Staffno:3880,Netops,TS(B)
> Senior Research Engineer   वरिष्ठ अनुसंधान अभियंता
> C-DOT                      सी-डॉट                    
> Electronics City,Phase-1   इलैक्ट्रॉनिक्स सिटी फेज़ I        
> Hosur Road,Bangalore       होसूर रोड, बेंगलूरु
> 560100                     560100
> ### Please consider the environment and print this email only if necessary
> .
> Go Green ###
> 
> Disclaimer :
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you are not the intended recipient you are notified that disclosing,
> copying, distributing or taking any action in reliance on the contents of
> this
> information is strictly prohibited. The sender does not accept liability
> for any errors or omissions in the contents of this message, which arise
> as
> a
> result.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> squid-users mailing list
> squid-users@xxxxxxxxxxxxxxxxxxxxx
> http://lists.squid-cache.org/listinfo/squid-users
> 

_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux