squid无法启动

    技术2022-06-25  49

    [转载自:http://hi.baidu.com/yerkle/blog/item/26c3eb177186720bc93d6d9b.html]

     

    今天SQUID突然停了,用service squid start显示OK,用netstat -an |grep tcp发现没监听相应端口,ps -x | grep squid也找不到进程 。

    查看/var/log/squid/squid.out发现以下错误。squid: ERROR: Could not send signal 0 to process 3275: (3) No such processsquid: ERROR: Could not send signal 0 to process 3275: (3) No such processsquid: ERROR: Could not send signal 0 to process 3275: (3) No such process重启系统问题依然存在。因为用的硬盘很小,怀疑没空间了。df一看果然是使用100%,汗,删除了缓存腾出空间后恢复正常。

    设定每日 23:59 清除 缓存文件vi /etc/squid/squid.freshcache#!/bin/sh/usr/bin/sargsleep 5ssyncservice squid stopsleep 5strue > /var/log/squid/access.logtrue > /var/log/squid/cache.logtrue > /var/log/squid/store.logrm -rf access.log.*rm -rf store.log.*sleep 5ssyncrm -rf /var/spool/squid/*sleep 5ssyncservice squid startchmod a+x /etc/squid/squid.freshcachevi /etc/crontab59 23 * * * root /etc/squid/squid.freshcache

     


    最新回复(0)