• 幕客老师召集小伙伴
  • python自动化运维项目实战
  • nginx从入门到实战
  • 阿里云与Centos7实战

Apache出现No space left on device错误解决

[Thu Jun 15 00:50:01 2017] [warn] pid file /var/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Thu Jun 15 00:50:01 2017] [emerg] (28)No space left on device: Couldn't create accept lock (/home/imoocc/apps/httpd/logs/accept.lock.2826) (5)

[Thu Jun 15 01:00:01 2017] [warn] pid file /var/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Thu Jun 15 01:00:01 2017] [emerg] (28)No space left on device: Couldn't create accept lock (/home/imoocc/apps/httpd/logs/accept.lock.3034) (5)

apache的error日志中出现如上错误日志,通过网上的资料搜寻,参考如下贴:

https://major.io/2007/08/24/apache-no-space-left-on-device-couldnt-create-accept-lock/

解决办法如下:

1、修改内核参数

kernel.msgmni = 1024

kernel.sem = 250 256000 32 1024

2、重新启动httpd

怀疑是因为上一次关闭httpd的时候,直接使用的kill -9的方式,导致httpd进程的信号量满了,

故,修改脚本的关闭方式,改为如下:

      kill -15 $(cat /var/run/httpd.pid)

      for i in `ipcs -s | awk '/imoocc/ {print $2}'`; do (ipcrm -s $i); done 

ps:可以通过

ipcs -s  打印出使用信号进行进程间通信的信息

ipcrm -s 移除

 

Apache出现No space left on device错误解决

Pingbacks已打开。

引用地址

暂无评论

发表评论