Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

Is there a safe time when to reboot server every morning?

Discussion in 'General Discussion' started by Jare, Jun 25, 2017.

  1. Jare

    Jare Member

    Joined:
    Sep 25, 2014
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    I would like to restart my WHM server automatically every morning. I'm looking for a safe time window when this could be done without interfering with cPanel's scheduled processes. I think that the latest time to do the reboot would be at 7 AM, so I would accept anything between 2 AM to 7 AM if it suits for the cPanel processes. After that there could be more clients using the emails and websites during the morning.

    Here is my current cron schedule (for the root user):

    The only thing I have added myself is the composer update command.

    Is there any other _system_ users whose cron schedule I should check? I know the user account schedules and they are not an issue, so I don't need to check those.

    Background: My server's RAM usage raises to around 95 % every morning at around 1 AM or 2 AM. I have expanded the RAM from 4gb to 7 gb, but the RAM usage is still the same 95 % at max. I think that this does cause an issue where one of my clients is not able to get mail synced to their Outlooks on three computers at morning. They need to wait a few hours and then the sync goes well. My main priority is to inspect _why_ the RAM usage gets so high - and that is a different topic - but in this discussion I would like to search for a backup solution in case if I am not able to find a better, permanent solution soon. If I can get the RAM usage down with scheduled reboots, then I have more time to look what causes the issue in the first place. Thanks! :)
     
  2. Eminds

    Eminds Well-Known Member

    Joined:
    Nov 10, 2016
    Messages:
    211
    Likes Received:
    13
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Rebooting server to resolve the high memory issues is not the solution and by rebooting the server every day you are actually loosing the uptime. So instead of rebooting the server , you have to identify the issue on the server , whats eating up RAM etc... Optimize the server , tweak it , fine tuning the server will resolve the issues.
     
  3. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,488
    Likes Received:
    60
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    Regarding the reboot, if you are concern about the cron, then you should go to the /var/spool/cron directory and look into the user's cron and analyze it. However, I think you should only check the main processes. The best for a reboot is to put the reboot schedule on the notice board, send in mails to the client updating them about the server downtime and reboot situation and then plan on it.

    Regarding the RAM, you will have to either ask your system administrator to check the online application of the RAM or you need to reboot the server, so the actual RAM would be visible.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Ideally, you'd address the memory usage issue first instead of rebooting the system via a daily cron job. The following thread is a good place to start:

    Troubleshooting high server loads on Linux servers

    That said, to answer your question, the 4AM time slot looks open based on the times the default cron jobs run, but that's assuming your nightly backup process finishes in under two hours.

    Thank you.
     
Loading...

Share This Page