Permission denied: couldn't grab the accept mutex

janton

Verified User
Joined
Sep 17, 2009
Messages
145
It seems my apache server has some problems. every day it shuts down somehow, after restart it works good, but it happends 1 or 2 times a day.. what could i do? i read this has something todo with my ssl and i need to add AcceptMutex flock to my httpd.conf but how come this happends?

[Wed Aug 31 21:37:37 2011] [emerg] (13)Permission denied: couldn't grab the accept mutex
[Wed Aug 31 21:37:37 2011] [alert] Child 17585 returned a Fatal error... Apache is exiting!
[Wed Aug 31 21:37:37 2011] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Wed Aug 31 21:37:37 2011] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Wed Aug 31 21:37:37 2011] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Wed Aug 31 21:37:37 2011] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Wed Aug 31 21:37:37 2011] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Wed Aug 31 21:37:37 2011] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Wed Aug 31 21:37:37 2011] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Wed Aug 31 21:37:37 2011] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Wed Aug 31 21:37:39 2011] [emerg] (22)Invalid argument: couldn't release the accept mutex
 
I also have mod_ruid2 installed> perhaps this could be the issue?
 
And wasn't it helpful?

Yes i have add the mutex line to the httpd.conf i hope it does work.. but the problem is it happends only 2 to 3 times a week.. so i will know if it worked after 1 week :)

Also i changed more things, so perhaps the combination did the job, untill now i did not have a crash yet. (day one)
 
I have the same problem after installing mod_ruid2 on multiple webservers.
Several running centos 5 and apache 2.2, and some centos 6 and apache 2.4 .

Today I discovered these webservers were all down at the same time (I still wonder why they all died at the same time)

Why is this "AcceptMutex flock" line not added to the standard httpd.conf yet.
And why this is not stated in the howto install mod_ruid2-topic on this forum: http://www.directadmin.com/forum/showthread.php?t=37467&highlight=mod_ruid

My question to you is,
is "AcceptMutex flock" really helping this problem to go away?

I need to follow up the problem, I've just added this line into httpd.conf.
I will probably let it know here when the problem persists.
 
As for custombuild 2.0 and apache 2.4.x (AcceptMutex replaced by Mutex in Apache 2.4) this line:

Code:
Mutex posixsem

is added into /etc/httpd/conf/extra/httpd-phpmodules.conf

If you don't have then you might need to

Code:
mv /usr/local/directadmin/custombuild/configure/ap2/conf /usr/local/directadmin/custombuild/configure/ap2/conf.moved

it's OK if you don't have the directory, don't worry if the directory does not exist.

Code:
cp -rf /etc/httpd/conf /etc/httpd/conf.bak

here we made a copy of the existing apache configs.

Code:
cd /usr/local/directadmin/custombuild
./build update
./build rewrite_confs

here we rewrote apache configs with defaults. If you've modified them ever before. You'll need to review them again.


Related and additional info

Directives AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex, and WatchdogMutexPath have been replaced with a single Mutex directive. You will need to evaluate any use of these removed directives in your 2.2 configuration to determine if they can just be deleted or will need to be replaced using Mutex.

http://httpd.apache.org/docs/2.4/upgrading.html
http://httpd.apache.org/docs/2.4/mod/core.html#mutex
 
Back
Top