{"id":765,"date":"2013-10-24T16:51:07","date_gmt":"2013-10-24T14:51:07","guid":{"rendered":"http:\/\/elkano.org\/blog\/?p=765"},"modified":"2013-10-24T16:51:07","modified_gmt":"2013-10-24T14:51:07","slug":"apache-log-22invalid-argument-grab-accept-mutex","status":"publish","type":"post","link":"https:\/\/elkano.org\/blog\/apache-log-22invalid-argument-grab-accept-mutex\/","title":{"rendered":"Apache log: (22)Invalid argument: couldn&#8217;t grab the accept mutex"},"content":{"rendered":"<p>Some days ago I saw these messages in the apache error log in a cpanel server, the virtualhost was getting a 500 error:<\/p>\n<pre class=\"dontquote prettyprint lang-xml\">\r\n[Tue Oct 22 14:37:11 2013] [emerg] (22)Invalid argument: couldn&#039;t grab the accept mutex\r\n[Tue Oct 22 14:37:11 2013] [emerg] (22)Invalid argument: couldn&#039;t grab the accept mutex\r\n[Tue Oct 22 14:37:11 2013] [emerg] (22)Invalid argument: couldn&#039;t grab the accept mutex\r\n<\/pre>\n<p>To solve this issue, edit \/usr\/local\/apache\/conf\/includes\/pre_virtualhost_global.conf file and add the following line:<\/p>\n<pre class=\"dontquote prettyprint lang-xml\">\r\nAcceptMutex posixsem\r\n<\/pre>\n<p>Then restart apache<\/p>\n<pre class=\"dontquote prettyprint lang-xml\">\r\n\/etc\/init.d\/httpd graceful\r\n<\/pre>\n<p>According to Apache documentation, the AcceptMutex directives sets the method that Apache uses to serialize multiple children accepting requests on network sockets. <\/p>\n<p>To read more see <a href=\"http:\/\/httpd.apache.org\/docs\/2.2\/mod\/mpm_common.html#acceptmutex\" title=\"AcceptMutex Documentation\" target=\"_blank\">AcceptMutex Directive documentation<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some days ago I saw these messages in the apache error log in a cpanel server, the virtualhost was getting a 500 error: [Tue Oct 22 14:37:11 2013] [emerg] (22)Invalid argument: couldn&#039;t grab the accept mutex [Tue Oct 22 14:37:11 2013] [emerg] (22)Invalid argument: couldn&#039;t grab the accept mutex [Tue Oct 22 14:37:11 2013] [emerg] [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[63,48,102],"_links":{"self":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts\/765"}],"collection":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/comments?post=765"}],"version-history":[{"count":2,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts\/765\/revisions"}],"predecessor-version":[{"id":767,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts\/765\/revisions\/767"}],"wp:attachment":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/media?parent=765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/categories?post=765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/tags?post=765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}