LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LinuxQuestions.org Member Success Stories (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/)
-   -   Apache "No Space Left on Device" message (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/apache-no-space-left-on-device-message-4175647218/)

TB0ne 01-29-2019 10:30 AM

Apache "No Space Left on Device" message
 
Came across something interesting today. Had a CentOS 6.5 server, running Apache. Everything working just fine, made a small modification to a page on the server, and decided to bounce the service. Apache would not start.

Looking in the error log, I saw:
Code:

[warn] pid file /etc/httpd/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[emerg] (28)No space left on device: Couldn't create accept lock (/etc/httpd/logs/accept.lock.8643) (5)

Obviously, first thing I did was check disk space, of which I had plenty on all of my volumes, which left me with a puzzle. It's telling me "no space", but I have lots available.

Upon further digging, I ran "ipcs -s", to check open semaphores...and saw LOTS:
Code:

0x00000000 20578420  apache    600        1
Rather than reboot for no good reason, I cleared them with:
Code:

for i in `ipcs -s | awk '/apache/ {print $2}'`; do (ipcrm -s $i); done
Note the "apache" in the command. SOME servers will have it listed as httpd, so modify as needed...the ipcs command will tell you what to use. Once they were cleared, Apache started right up.


All times are GMT -5. The time now is 03:13 PM.