{"id":6557,"date":"2017-03-20T13:04:28","date_gmt":"2017-03-20T05:04:28","guid":{"rendered":"http:\/\/rmohan.com\/?p=6557"},"modified":"2017-03-20T13:04:28","modified_gmt":"2017-03-20T05:04:28","slug":"apache-error-semget-no-space-left-on-device-2","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6557","title":{"rendered":"Apache Error: \u201csemget: No space left on device\u201d"},"content":{"rendered":"<p>semget: No space left on device<\/p>\n<p>To see how many semaphores are being used, <a href=\"http:\/\/liquidweb.com\/kb\/new-user-tutorial-basic-ssh\/\">SSH<\/a> to your server as root and run the following:<\/p>\n<p>ipcs -s<\/p>\n<p>In order to get Apache started again, we must clear the semaphores. Run this for-loop to flush them:<\/p>\n<p>for whatever in `ipcs -s | awk &#8216;{print $2}&#8217;`; do ipcrm -s $whatever; done<\/p>\n<p>On older servers that command may not work. In these cases, you may need to do the following:<\/p>\n<p>\/sbin\/service httpd stop<br \/>\nipcs -s | grep nobody | gawk &#8216;{ print $2 }&#8217; | xargs -n 1 ipcrm sem<br \/>\n\/sbin\/service httpd start<\/p>\n<p>If this is a common problem for you, you may want to increase the semaphore limits on your server. You can do that by adding the following to the \/etc\/sysctl.conf file:<\/p>\n<p># Increases the semaphore limits &amp; extend Apache&#8217;s uptime.<br \/>\nkernel.msgmni = 512<br \/>\nkernel.sem = 250 128000 32 512<\/p>\n<p>Then load the new settings into the kernel:<\/p>\n<pre>sysctl -p<\/pre>\n<p>Note: This post assumes you are running Apache on a Linux server, are familiar with the <a href=\"http:\/\/liquidweb.com\/kb\/new-user-tutorial-basic-shell-commands\/\">command line<\/a>, and have root access to the server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>semget: No space left on device<\/p>\n<p>To see how many semaphores are being used, SSH to your server as root and run the following:<\/p>\n<p>ipcs -s<\/p>\n<p>In order to get Apache started again, we must clear the semaphores. Run this for-loop to flush them:<\/p>\n<p>for whatever in `ipcs -s | awk &#8216;{print $2}&#8217;`; do ipcrm [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,73],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6557"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6557"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6557\/revisions"}],"predecessor-version":[{"id":6558,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6557\/revisions\/6558"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6557"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6557"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}