1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Automatic apache restart?

Discussion in 'Apache' started by croni, Nov 14, 2006.

  1. #1
    Hi all,

    I wonder whether I should let a script check (say every 5 minutes or so) whether apache is still running. If it's not, the script would automatically restart.

    How do you do it? Is this a good practice?
     
    croni, Nov 14, 2006 IP
  2. lucoxade

    lucoxade Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Have you ever had Apache just stop on you!?!?
     
    lucoxade, Nov 14, 2006 IP
  3. croni

    croni Peon

    Messages:
    66
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yeah, once! Couldn't figure out why... (how can one figure it out anyway?)
     
    croni, Nov 14, 2006 IP
  4. dhruv37

    dhruv37 Well-Known Member

    Messages:
    3,222
    Likes Received:
    195
    Best Answers:
    0
    Trophy Points:
    165
    #4
    as per my knowledge restarting apache after every 5 mins. is not good practise.

    It can affect your sessions on the web sites.

    I am not sure...so better to wait for reply from some expert
     
    dhruv37, Nov 15, 2006 IP
  5. croni

    croni Peon

    Messages:
    66
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Well, I'd only restart it if it's not down, of course!
     
    croni, Nov 15, 2006 IP
  6. PalSys

    PalSys palsys.io

    Messages:
    2,628
    Likes Received:
    224
    Best Answers:
    0
    Trophy Points:
    230
    #6
    I keep a cron set on my busiest network servers to restart Apache every hour, just in case. I do find Apache can just quit at times with a high load.
     
    PalSys, Nov 22, 2006 IP
  7. TheBrain

    TheBrain Guest

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    There is a command called procautostart that will restart a process for you if it dies.
     
    TheBrain, Dec 2, 2006 IP
  8. sukantab

    sukantab Well-Known Member

    Messages:
    2,075
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    110
    #8
    It is better to do a chron setup, that checks if apache is down, start it up. You can set the frequency something between 15 mins to 30 mins.
     
    sukantab, Dec 3, 2006 IP
  9. TheBrain

    TheBrain Guest

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Sure you can do that, but if the apache daemon dies right after the check then it could be down for 15 to 30 minutes.


     
    TheBrain, Dec 3, 2006 IP