Posted by: Mangesh_Linux_Administrator | November 27, 2010

Unable to start apache (semget: No space left on device)

Unable to start Apache service on linux server.

First of all verify the disk space on server.

If there is no problem with disk space, you need to verify the logs with

tail -f /usr/local/apache/logs/error_logs

[Sat Oct 10 00:11:01 2008] [warn] pid file /usr/local/apache/logs/ overwritten — Unclean shutdown of previous Apache run?
semget: No space left on device

It means There is no more space left in Semaphore Arrays for Apache.

semaphore is a location in memory whose value can be tested and set by more than one process.

you can check the semaphore arrays on your server using the following command

ipcs -s

It results

—— Semaphore Arrays ——–
key semid owner perms nsems
0x00000000 360448 nobody 600 1
0x00000000 393217 nobody 600 1
0x00000000 425986 nobody 600 1
0x00000000 458755 nobody 600 1
0x00000000 524292 nobody 600 1
0x00000000 1114117 nobody 600 1
0x00000000 1441798 nobody 600 1
0x00000000 3604487 nobody 600 1
0x00000000 3702792 nobody 600 1
0x00000000 3768329 nobody 600 1
0x00000000 6422538 nobody 600 1

If here you get big list of semaphores it means some semaphores are stuck. You can clear them out with this command:

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

#/etc/init.d/httpd restart


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: