[squid-users] Squid and CPU 100%

Vieri rentorbuy at yahoo.com
Tue Nov 7 11:42:11 UTC 2017


Sorry to bring this back up, but every now and then (few days) I need to restart squid because its CPU usage goes up to 100% for a long time (irresponsive).

Right before restarting Squid:

# free [11/07/17 11:18:52]
total used free shared buff/cache available
Mem: 32865056 14811320 1374212 157028 16679524 17557656
Swap: 37036988 287320 36749668

# squidclient mgr:info [11/07/17 11:18:52]

# squidclient mgr:mem [11/07/17 11:19:02]

# squidclient mgr:storedir [11/07/17 11:19:22]

# squidclient mgr:filedescriptors [11/07/17 11:19:42]

# squidclient mgr:events [11/07/17 11:20:12]

In other words, squidclient does not get any info from squid (waited max 30 seconds - maybe I need to wait more).

I also dumped an strace here:
https://drive.google.com/file/d/1yed-sNWrc6KBQSOV7KPbrYOForwwtkCe/view?usp=sharing

You probably won't be able to draw any conclusions so I'll try to update to squid-3.5.27-20171101-re69e56c (I'm now running 3.5.27-20170916-re69e56c).

Note that stopping Squid with:

/usr/sbin/squid -k shutdown -f /etc/squid/squid.conf -n squid

takes a LONG time, but it eventually does stop (the process dies out).

I can then restart it cleanly.

I don't need to kill the pid (unless I'm told to hurry up).

After checking the log I can see these messages:

2017/11/07 11:16:59 kid1| WARNING! Your cache is running out of filedescriptors
2017/11/07 11:16:59 kid1| comm_open: socket failure: (24) Too many open files

Now, you can notice that the max_filedescriptors is quite high, and was set correctly before and after the issue I'm reporting:

# tail -n 100000 /var/log/squid/cache.log | grep -i descript
2017/11/06 06:36:14 kid1| With 32768 file descriptors available
2017/11/07 11:15:15 kid1| WARNING! Your cache is running out of filedescriptors
2017/11/07 11:15:31 kid1| WARNING! Your cache is running out of filedescriptors
2017/11/07 11:16:13 kid1| WARNING! Your cache is running out of filedescriptors
2017/11/07 11:16:59 kid1| WARNING! Your cache is running out of filedescriptors
2017/11/07 11:17:35 kid1| WARNING! Your cache is running out of filedescriptors
2017/11/07 11:17:51 kid1| WARNING! Your cache is running out of filedescriptors
2017/11/07 11:18:07 kid1| WARNING! Your cache is running out of filedescriptors
2017/11/07 11:18:25 kid1| WARNING! Your cache is running out of filedescriptors
2017/11/07 11:18:45 kid1| WARNING! Your cache is running out of filedescriptors
2017/11/07 11:19:03 kid1| WARNING! Your cache is running out of filedescriptors
2017/11/07 11:19:19 kid1| WARNING! Your cache is running out of filedescriptors
2017/11/07 11:19:35 kid1| WARNING! Your cache is running out of filedescriptors
2017/11/07 11:19:53 kid1| WARNING! Your cache is running out of filedescriptors
2017/11/07 11:20:09 kid1| WARNING! Your cache is running out of filedescriptors
2017/11/07 11:20:28 kid1| WARNING! Your cache is running out of filedescriptors
2017/11/07 11:20:44 kid1| WARNING! Your cache is running out of filedescriptors
2017/11/07 11:21:01 kid1| WARNING! Your cache is running out of filedescriptors
2017/11/07 11:23:05 kid1| With 32768 file descriptors available

So I'm worried that 32768 may not be enough.
Is this weird, or should I really increase this value?

Thanks,

Vieri


More information about the squid-users mailing list