• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

apachectl -k graceful ???

L

linuxxphybrid

Guest
I am currently writing a script to restart Apache2 upon it's hanging/locking up (I know that I need to resolve the problem, but I need the script to mitigate downtime for the time being). I thought about writing the script initially because Apache2 does not go down completely; it seems that Apache2 hangs, but httpd (several) processes keep up and running. I figured that I need to check HTTP, check what Apache2 returns within a reasonable amount of time (10 - 20 seconds?) and if there is no valid return, then restart Apache2. However, I got the following suggestion from a webmaster/programmer/system administrator in some other forum; run apachectl -k graceful every 5 minutes instead of writing the script. I'm not 100% sure if this is what I want to use, and I'd like to ask a couple of questions here.

Q1. Does "apachectl -k graceful" essentially check HTTP? In other words, if Apache2 is in the state that you cannot view any page while you try to access sites hosted using the browser, does "apachectl -k graceful" restart Apache2?

Q1.2. If Apache2 is running without any problem, "apachectl -k graceful" doesn't restart Apache2 unnecessarily, does it?

Q2. How come something like this is not set up by default?
 
Back
Top