A strange reason that causes httpd dead

Today, my website is down.

This problem persists even I restart httpd. I have to look into the apache log to investigate what happened. Where is the apache log? I know the location of the error/access log for the website. They can be specified in the virtual host section of httpd.conf. If you are using sentora, the logs are in /var/sentora/logs/domains/zadmin/. But these log files are apparently not what I’m looking for. This error log I’m looking for is not specific to a website but a global one. After searching, I find the apache error log is /var/log/httpd/error_log. There is an error in this log file,

It seems my server has run out of HDD space. But using the “df” command, I find there is still much space available to use. So what causes httpd dead? In fact, the httpd died of exhausting of semaphores. An account can have a limited semaphores to use. The following command can be used to find the limit:

You can check how many semaphores are being used by apache:

After using up all available semaphores, httpd will die and cannot be restarted. Knowing the root cause, the solution to fix the problem is easy: delete all semaphores that apache is using:


Now restart httpd, apache will work normally.





Posted in tips of hosting