Apache Error: “semget: No space left on device”
If Apache fails, and will not successfully start again, check the error log. If you see an error similar to the following, it could indicate that your server has run out of semaphores.
semget: No space left on device
To see how many semaphores are being used, SSH to your server as root and run the following:
ipcs -s
In order to get Apache started again, we must clear the semaphores. Run this for-loop to flush them:
for whatever in `ipcs -s | awk '{print $2}'`; do ipcrm -s $whatever; done
On older servers that command may not work. In these cases, you may need to do the following:
/sbin/service httpd stop
ipcs -s | grep nobody | gawk '{ print $2 }' | xargs -n 1 ipcrm sem
/sbin/service httpd start
If this is a common problem for you, you may want to increase the semaphore limits on your VPS server. You can do that by adding the following to the /etc/sysctl.conf file:
# Increases the semaphore limits & extend Apache's uptime.
kernel.msgmni = 512
kernel.sem = 250 128000 32 512
Then load the new settings into the kernel:
sysctl -p
Note: This post assumes you are running Apache on a Linux server, are familiar with the command line, and have root access to the server.
===
Liquid Web’s Heroic Support is always available to assist customers with this or any other issue. If you need our assistance please contact us:
Toll Free 1.800.580.4985
International 517.322.0434
support@liquidweb.com
https://manage.liquidweb.com/
Related Articles:

About the Author: J. Mays
As a previous contributor, JMays shares his insight with our Knowledge Base center. In our Knowledge Base, you'll be able to find how-to articles on Ubuntu, CentOS, Fedora and much more!
Our Sales and Support teams are available 24 hours by phone or e-mail to assist.
Latest Articles
2024 cPanel and Plesk pricing breakdown
Read ArticleCentOS Linux 7 EOL — everything you need to know
Read ArticleHow to install Node.js on Linux (AlmaLinux)
Read ArticleUpgrading or installing PHP on Ubuntu — PHP 7.2 and Ubuntu 22.04
Read ArticleWhy is your IP blocked?
Read Article