Space full on device

Whenever you start Apache, it keeps crashing with error “semget: No space left on device”.

# tail /etc/httpd/logs/error_log
semget: No space left on device
semget: No space left on device
[Wed Sep 12 10:54:27 2007] [warn] pid file /usr/local/apache/logs/httpd.pid overwritten
– Unclean shutdown of previous Apache run? semget: No space left on device
[Wed Sep 12 10:56:27 2007] [warn] pid file /usr/local/apache/logs/httpd.pid overwritten
– Unclean shutdown of previous Apache run? semget: No space left on device
[Wed Sep 12 10:58:27 2007] [warn] pid file /usr/local/apache/logs/httpd.pid overwritten
– Unclean shutdown of previous Apache run? semget: No space left on device
[Wed Sep 12 11:00:27 2007] [warn] pid file /usr/local/apache/logs/httpd.pid overwritten
– Unclean shutdown of previous Apache run? semget: No space left on device

If you have similar problem as mine above + if your disk space is nowhere near/above 100% + /var/messages and /usr/local/apache/logs/error_log shows no clue about this problem + any files in /etc/httpd/logs/ and /etc/httpd/domlogs nowhere near/above 2GB in size, its most probably semaphore problem. Use the following script to cure your Apache.

#!/bin/bash

ipcs -s | grep nobody | perl -e ‘while () {
@a=split(/\s+/); print `ipcrm sem $a[1]`}’

/scripts/restartsrv httpd

Script how to:
- SSH as root to your CPanel server
- Go to root dir

# cd /root

- Create a httpdsemclean.sh blank file

# pico httpdsemclean.sh

- Write above script
- Save

Ctrl + O

- Exit pico

Ctrl + X

- Chmod httpdsemclean.sh to 777

# chmod 777 httpdsemclean.sh

- Execute the script

./httpdsemclean.sh

If all goes fine, you’ll see something like this:


resource(s) deleted
resource(s) deleted
resource(s) deleted
resource(s) deleted
resource(s) deleted
resource(s) deleted
resource(s) deleted
resource(s) deleted
resource(s) deleted
resource(s) deleted
Waiting for httpd to restart…………..finished.

httpd started ok

Do this at your own risk, we do not guarantee this will work on all CPanel servers

3 comments:

  • iPhone Malaysia

    Well I can see that the article is rather special with plenty of accurate information. Anyway, was wondering whether you would love to exchange web links with my website, as I am looking to establish contacts to further extend and get better web exposure for my web portal. I do not mind you positioning my contacts at the homepage, just accepting this links on this page is good and sufficient. Also, would you be kind enough contact me at my web portal if you are keen in exchanging links with me, I would really value that. Best wishes from me and I hope to get a reply from you soon!

  • foam mattress

    I really enjoyed reading your post here and I just wanted to tell you that I totally agree with what you're saying! It's hard to find people that think alike these days. Keep it up

  • Loni Lieberg

    Spitze Design hat dieser Blog. Woher hast du die Vorlage ? War bestimmt sehr teuer.

  • Post a Comment