Hi everyone, I am back to track with blogging on GNU/Linux and open source technologies. During my work, I discovered a weird bug with running Apache web server in my Ubuntu 20.04 focal server. The server was running a Magento eCommerce website and all of a sudden, it got crashed periodically. On checking the apache log at /var/log/apache2/error.log I got an error “couldn’t grab the accept mutex”.
[Tue Nov 09 11:59:43.551011 2021] [core:notice] [pid 30891] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 09 12:02:46.571104 2021] [mpm_prefork:emerg] [pid 30894] (43)Identifier removed: AH00144: couldn't grab the accept mutex
[Tue Nov 09 12:02:46.571100 2021] [mpm_prefork:emerg] [pid 30895] (43)Identifier removed: AH00144: couldn't grab the accept mutex
[Tue Nov 09 12:02:46.571113 2021] [mpm_prefork:emerg] [pid 55417] (43)Identifier removed: AH00144: couldn't grab the accept mutex
[Tue Nov 09 12:02:46.571159 2021] [mpm_prefork:emerg] [pid 55419] (43)Identifier removed: AH00144: couldn't grab the accept mutex
[Tue Nov 09 12:02:46.571216 2021] [mpm_prefork:emerg] [pid 55420] (43)Identifier removed: AH00144: couldn't grab the accept mutex
[Tue Nov 09 12:02:46.903436 2021] [core:alert] [pid 30891] AH00050: Child 30894 returned a Fatal error... Apache is exiting!
[Tue Nov 09 12:02:46.903529 2021] [:emerg] [pid 30891] AH02818: MPM run failed, exiting
And on further checks on the internet, I got to fix it by adding the following line in the /etc/apache2/apache2.conf file in Ubuntu 20.04 LTS server near ServerRoot.
$ sudo nano /etc/apache2/apache2.conf
Mutex flock
Once added, I simply restarted the apache web server by executing the following command:
$ sudo systemctl restart apache2
Conclusion
Hope the above fix on the error “couldn’t grab the accept mutex” saved your day! If you have any questions, suggestions, feedback please don’t hesitate to write them in the comment box below because it will help us to improve or correct our contents. Thanks, Happy FOSS Computing 🙂