Hi, I have recently upgraded our web proxy to CentOS 5.6. Before the upgrade, squid was running fine. Since the upgrade, sometimes, squid crashes:> [root at stargate ~]# service squid status > squid dead but pid file existsLooking at log files, I think it could be related to logrotate stuff,> -rw-r----- 1 squid squid 42713088 May 3 04:02 store.log > -rw-r----- 1 squid squid 8192 May 3 04:02 cache.log > -rw-r----- 1 squid squid 35778160 May 3 04:02 access.logI will look at the latest RPMs to check differences on /etc/logrotate.d/squid. Laurent. -- Laurent CREPET <lct at megrapet.fr>
On Tue, 3 May 2011 09:46:05 +0200 Laurent CREPET <lct at megrapet.fr> wrote:> I will look at the latest RPMs to check differences on /etc/logrotate.d/squid.Packages: squid-2.6.STABLE21-6.el5 logrotate-3.7.4-9.el5_5.2 In /var/log/squid/cache.log:> 2011/05/03 04:02:12| storeDirWriteCleanLogs: Starting... > 2011/05/03 04:02:12| WARNING: Closing open FD 15 > 2011/05/03 04:02:12| commSetEvents: epoll_ctl(EPOLL_CTL_DEL): failed on fd=15: (1) Operation not permitted > 2011/05/03 04:02:12| 65536 entries written so far. > 2011/05/03 04:02:12| 131072 entries written so far. > 2011/05/03 04:02:12| 196608 entries written so far. > 2011/05/03 04:02:12| 262144 entries written so far. > 2011/05/03 04:02:12| 327680 entries written so far. > 2011/05/03 04:02:12| 393216 entries written so far. > 2011/05/03 04:02:12| 458752 entries written so far. > 2011/05/03 04:02:12| 524288 entries written so far. > 2011/05/03 04:02:12| 589824 entries written so far. > 2011/05/03 04:02:13| 655360 entries written so far. > 2011/05/03 04:02:13| 720896 entries written so far. > 2011/05/03 04:02:13| 786432 entries written so far. > 2011/05/03 04:02:13| 851968 entries written so far. > 2011/05/03 04:02:13| 917504 entries written so far. > 2011/05/03 04:02:13| 983040 entries written so far. > 2011/05/03 04:02:13| 1048576 entries written so far. > 2011/05/03 04:02:13| 1114112 entries written so far. > 2011/05/03 04:02:13| 1179648 entries written so far. > 2011/05/03 04:02:14| Finished. Wrote 1236584 entries. > 2011/05/03 04:02:14| Took 1.3 seconds (964362.7 entries/sec). > FATAL: logfileWrite: /var/log/squid/store.log: (11) Resource temporarily unavailable > > Squid Cache (Version 2.6.STABLE21): Terminated abnormally. > CPU Usage: 174.999 seconds = 102.121 user + 72.878 sys > Maximum Resident Size: 901712 KB > Page faults with physical i/o: 2 > Memory usage for squid via mallinfo(): > total space in arena: 218616 KB > Ordinary blocks: 213843 KB 241 blks > Small blocks: 0 KB 0 blks > Holding blocks: 4972 KB 3 blks > Free Small blocks: 0 KB > Free Ordinary blocks: 4772 KB > Total in use: 218815 KB 98% > Total free: 4772 KB 2% > 2011/05/03 04:02:17| Starting Squid Cache version 2.6.STABLE21 for x86_64-redhat-linux-gnu... > 2011/05/03 04:02:17| Process ID 29401 > 2011/05/03 04:02:17| With 1024 file descriptors available > 2011/05/03 04:02:17| Using epoll for the IO loop > 2011/05/03 04:02:17| DNS Socket created at 0.0.0.0, port 42081, FD 6Squid is restarted by logrotate, but crashes.> 2011/05/03 04:02:17| Target number of buckets: 393877 > 2011/05/03 04:02:17| Using 524288 Store buckets > 2011/05/03 04:02:17| Max Mem size: 8192 KB > 2011/05/03 04:02:17| Max Swap size: 102400000 KB > 2011/05/03 09:32:33| Starting Squid Cache version 2.6.STABLE21 for x86_64-redhat-linux-gnu... > 2011/05/03 09:32:33| Process ID 6173 > 2011/05/03 09:32:33| With 1024 file descriptors available > 2011/05/03 09:32:33| Using epoll for the IO loop > 2011/05/03 09:32:33| DNS Socket created at 0.0.0.0, port 57536, FD 6Laurent. -- Laurent CREPET <lct at megrapet.fr>
On Tue, 3 May 2011 09:46:05 +0200 Laurent CREPET <lct at megrapet.fr> wrote:> I will look at the latest RPMs to check differences on /etc/logrotate.d/squid.I'm suprised... it seems that both packages have not been modified for a while.> [root at stargate ~]# ls -latr /var/log/yum.log* > -rw-r--r-- 1 root root 11559 Dec 30 2009 /var/log/yum.log.2 > -rw------- 1 root root 27610 Dec 23 11:27 /var/log/yum.log.1 > -rw------- 1 root root 11234 May 1 08:45 /var/log/yum.log > [root at stargate ~]# > [root at stargate ~]# egrep -i "squid|logrotate" !$ > egrep -i "squid|logrotate" /var/log/yum.log* > /var/log/yum.log.1:May 28 16:19:29 Updated: 7:squid-2.6.STABLE21-6.el5.x86_64 > /var/log/yum.log.1:Oct 15 13:07:31 Updated: logrotate-3.7.4-9.el5_5.1.x86_64 > /var/log/yum.log.1:Nov 08 09:26:57 Updated: logrotate-3.7.4-9.el5_5.2.x86_64 > /var/log/yum.log.2:Dec 06 13:14:54 Installed: 7:squid-2.6.STABLE21-3.el5.x86_64> [root at stargate ~]# grep -i centos-release /var/log/yum.log* > /var/log/yum.log:Apr 18 15:27:25 Updated: centos-release-notes-5.6-0.x86_64 > /var/log/yum.log:Apr 18 15:27:25 Updated: 10:centos-release-5-6.el5.centos.1.x86_64 > /var/log/yum.log.1:May 28 16:19:13 Updated: centos-release-notes-5.5-0.x86_64 > /var/log/yum.log.1:May 28 16:19:13 Updated: 10:centos-release-5-5.el5.centos.x86_64Any ideas ? Laurent. -- Laurent CREPET <lct at megrapet.fr>