<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Semaphore on Major Hayden</title><link>https://major.io/tags/semaphore/</link><description>Recent content in Semaphore on Major Hayden</description><generator>Hugo</generator><language>en</language><managingEditor>major@mhtx.net (Major Hayden)</managingEditor><webMaster>major@mhtx.net (Major Hayden)</webMaster><copyright>All content licensed [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)</copyright><lastBuildDate>Sun, 07 Jun 2026 23:39:03 +0000</lastBuildDate><atom:link href="https://major.io/tags/semaphore/index.xml" rel="self" type="application/rss+xml"/><item><title>Apache: No space left on device: Couldn’t create accept lock</title><link>https://major.io/p/apache-no-space-left-on-device-couldnt-create-accept-lock/</link><pubDate>Fri, 24 Aug 2007 21:55:30 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/apache-no-space-left-on-device-couldnt-create-accept-lock/</guid><description>&lt;p&gt;This error completely stumped me a couple of weeks ago. Apparently someone was adjusting the Apache configuration, then they checked their syntax and attempted to restart Apache. It went down without a problem, but it refused to start properly, and didn&amp;rsquo;t bind to any ports.&lt;/p&gt;
&lt;p&gt;Within the Apache error logs, this message appeared over and over:&lt;/p&gt;
&lt;pre lang="html"&gt;[emerg] (28)No space left on device: Couldn't create accept lock&lt;/pre&gt;
&lt;p&gt;Apache is basically saying “I want to start, but I need to write some things down before I can start, and I have nowhere to write them!” If this happens to you, check these items in order:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Check your disk space&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This comes first because it&amp;rsquo;s the easiest to check, and sometimes the quickest to fix. If you&amp;rsquo;re out of disk space, then you need to fix that problem. :-)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Review filesystem quotas&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If your filesystem uses quotas, you might be reaching a quota limit rather than a disk space limit. Use &lt;code&gt;repquota /&lt;/code&gt; to review your quotas on the root partition. If you&amp;rsquo;re at the limit, raise your quota or clear up some disk space. Apache logs are usually the culprit in these situations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Clear out your active semaphores&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Semaphores? What the heck is a semaphore? Well, it&amp;rsquo;s actually an &lt;a href="http://en.wikipedia.org/wiki/Semaphore"&gt;apparatus for conveying information by means of visual signals&lt;/a&gt;. But, when it comes to programming, &lt;a href="http://en.wikipedia.org/wiki/Semaphore_%28programming%29"&gt;semaphores are used for communicating between the active processes of a certain application&lt;/a&gt;. In the case of Apache, they&amp;rsquo;re used to communicate between the parent and child processes. If Apache can&amp;rsquo;t write these things down, then it can&amp;rsquo;t communicate properly with all of the processes it starts.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;d assume if you&amp;rsquo;re reading this article, Apache has stopped running. Run this command as root:&lt;/p&gt;
&lt;pre lang="html"&gt;# ipcs -s&lt;/pre&gt;
&lt;p&gt;If you see a list of semaphores, Apache has not cleaned up after itself, and some semaphores are stuck. Clear them out with this command:&lt;/p&gt;
&lt;pre lang="html"&gt;# for i in `ipcs -s | awk '/httpd/ {print $2}'`; do (ipcrm -s $i); done&lt;/pre&gt;
&lt;p&gt;Now, in almost all cases, Apache should start properly. If it doesn&amp;rsquo;t, you may just be completely out of available semaphores. You may want to increase your available semaphores, and you&amp;rsquo;ll need to tickle your kernel to do so. Add this to /etc/sysctl.conf:&lt;/p&gt;
&lt;pre lang="html"&gt;kernel.msgmni = 1024
kernel.sem = 250 256000 32 1024&lt;/pre&gt;
&lt;p&gt;And then run &lt;code&gt;sysctl -p&lt;/code&gt; to pick up the new changes.&lt;/p&gt;
&lt;p&gt;Further reading:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Semaphore_%28programming%29"&gt;Wikipedia: Semaphore (Programming)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.webpipe.net/howto/Apache_accept_lock_fix"&gt;Apache accept lock fix&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>