The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Restart not reboot

Discussion in 'General Discussion' started by vikins, Jun 11, 2008.

  1. vikins

    vikins Well-Known Member

    Joined:
    Oct 3, 2006
    Messages:
    93
    Likes Received:
    1
    Trophy Points:
    8
    There is a section in the WHM called "Restart Services" but isn't is really rebooting the services? Meaning, it isn't doing a soft restart, but instead completely stopping the service and then restarting. Am I correct?

    If that is the case, is their an easy way to just restart a service (as in HUP it) so that it picks up on config changes, etc?

    Thank you!
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    "Restart Services" calls the appropriate /scripts/restartsrv_* script. If the service is running, it is gracefully stopped. Then the service is gracefully started.

    Which service is this in reference to and what modifications are you making?
     
  3. vikins

    vikins Well-Known Member

    Joined:
    Oct 3, 2006
    Messages:
    93
    Likes Received:
    1
    Trophy Points:
    8
    If you use a command like this:

    apachectl graceful

    The PID's of the Apache processes do not change, it simply rereads the config file.

    If you use restart from the WHM Apache is completely shutdown and restarted creating a small window of unnecessary downtime.

    I think there should be two options, reboot and restart in the WHM.
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    If you are modifying Apache via the WHM interface (or by other cPanel/WHM functionality such as creating, terminating or suspending an account), this graceful restart is done automatically when necessary for any affected services.
     
  5. vikins

    vikins Well-Known Member

    Joined:
    Oct 3, 2006
    Messages:
    93
    Likes Received:
    1
    Trophy Points:
    8
    So maybe this is just more of a WHM interface clarification. To me, restart means at no point will the service be down. Reboot means it goes down and comes back up.

    Newer WHM users may not have a problem with this wording, but I think old school (pre-control panel era) people would be confused by it. I know I was.
     
  6. eagle

    eagle Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Imho services don't boot and reboot, just nodes (servers) do.

    Services/deamons can restart (stop first) and reload (just read the config again).
     
  7. ckh

    ckh Well-Known Member

    Joined:
    Dec 6, 2003
    Messages:
    356
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Phoenix, AZ
    cPanel Access Level:
    DataCenter Provider
    You restart software, you reboot a computer. That's what I've known it as for years.... Any service or daemon is software so you restart it. If you have a windows computer, you restart windows.
     
  8. vikins

    vikins Well-Known Member

    Joined:
    Oct 3, 2006
    Messages:
    93
    Likes Received:
    1
    Trophy Points:
    8
    There is another level of "restart" where it just reads in the new config file, and it doesn't disrupt service. It does not stop first, reload, start again.

    Apache for example:
    apachectl graceful has no effect on the PID of the parent process, but all child processes are restarted (after finishing what they were doing) and the config is read in again.

    And even apachectl restart keeps the main PID the same. It doesn't shut Apache down and restart.

    But the process that WHM is using DOES shut it down and then restart it, causing a window of downtime and errors to browsers attempting to connect during that window. Oh a heavy site this will occur.

    To me WHM is doing a Hard Restart, maybe that is a better term? Because it is more than just a "restart" when clearly Apache's own terminology of restart is something else.

    Does that help clarify my point a little better?

    My actual goal was to have both "soft" and "hard" restarts available through the WHM and to point out that some clarification may be in order in the current WHM.
     
  9. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    If you are administering your server via WHM, any need for manual "soft restarts" would be unnecessary as those are automatically handled by WHM when/if necessary.

    If you are modifying configurations manually via the command line such that a service would need to have a "soft restart," it would be safe to assume you also know how to do such via the command line.
     
  10. vikins

    vikins Well-Known Member

    Joined:
    Oct 3, 2006
    Messages:
    93
    Likes Received:
    1
    Trophy Points:
    8
    True, but it is often hard to remember the exact syntax for each service. They don't all have the same command line soft restart syntax.

    I don't know, it was just something that confused me when I first started using WHM coming from a command line, no cPanel world. Maybe I'm the only one. :)
     
  11. lloyd_tennison

    lloyd_tennison Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    698
    Likes Received:
    1
    Trophy Points:
    18
    The soft restart as you say in many cases is called a "reload", such as service MailScanner reload - which only reloads the config/worker files. Some software has it, some does not. Since none of the services in WHM in that section are actually written by Cpanel - you are at the mercy of the programmers.
     
  12. vikins

    vikins Well-Known Member

    Joined:
    Oct 3, 2006
    Messages:
    93
    Likes Received:
    1
    Trophy Points:
    8
    Yep, reload, that is the word I should have used. Many do have reload options though. It would be nice to see that available in the WHM.
     
Loading...

Share This Page