1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

apachectl -k graceful ???

Discussion in 'Plesk for Linux - 8.x and Older' started by linuxxphybrid, Jan 2, 2006.

  1. linuxxphybrid

    linuxxphybrid Guest

    0
     
    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?
     
Loading...