return 42;

by Jan Wedel

Apache Crash - Couldn't release the accept mutex

After an linux system update on a hosted machine, our web application, running on an Apache 2.2 stopped working. Acutally, it was even worse: The whole Apache deamon crashed.

The log file said:

[emerg] (1)Operation not permitted: couldn't release the accept mutex
[alert] Child 10758 returned a Fatal error... Apache is exiting!

After some Google searching, some people came up with the solution to add the following line:

AcceptMutex posixsem


I was thinking that the solution below works because I was using curl for testing and initially, curl returned an SSL error. After applying the changes explained below, this error was gone. However, there were some redirects and following these, Apache crashed again. Actually, using AcceptMutex eventually did the trick and I was thinking I am smarter than I actually was -.-

[Update End]

However, I was asking myself why it would stop working after an update. When using curl to GET the web page, curl responded with an SSL error. So I was looking into the ssl-global.conf log file which hat the following line:

SSLMutex  "file:/var/lib/apache2/ssl_mutex"

Then I checked and found out that the file was missing. So presumably, after the update, they clear varwhich is theoretically OK but Apache did not create the file again.

So I simply did:

touch /var/lib/apache2/ssl_mutex
chown wwwrun:www /var/lib/apache2/ssl_mutex

After restartarting Apache (probably not even necessary), everything worked again.

Jan Wedel's DEV Profile