Apache shutdown - Couldn't grab mutex

前端 未结 4 706
无人及你
无人及你 2020-12-29 11:22

For some reasons unknow to me, Apache is crashing.

This is the apache log at the moment of the crash:

[Sat Jun 02 02:38:05.196006 2018] [mpm_prefork:         


        
4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-29 12:11

    While Sean solution is valid, I learned another way to solve this problem.

    First, you should know that this problem is related to using Certbot and SSL certificates on Ubuntu.

    Now, to solve the problem without doing anything you're unsure of, simply do this (as root or with sudo):

    1. Create the following file: /etc/apache2/conf-available/mutex-file.conf
    2. Add Mutex file:${APACHE_LOCK_DIR} default inside the newly created file
    3. Enable new configuration file with a2enconf mutex-file
    4. Restart Apache with systemctl restart apache2

    But hey, it's already enabled by default! Why make a file just for that?

    I though the same when I found this solution.

    By one wonder or another, it seems that once your start using SSL certificates, this configuration line is somehow "ignored".
    Thus, Apache fail to find the lock dir for the mutex file.

    Just adding (remove comment) this line into /etc/apache2/apache2.conf isn't working either.
    You have to specifically create a configuration file and enable it.
    Else it won't solve the problem.

提交回复
热议问题