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.

Anyway to automatically Reboot a VPS after a time period?

Discussion in 'Site & Server Administration' started by newbie191, Nov 25, 2010.

  1. #1
    I am facing this problem for sometime now. My ram gets all used and the sites on server stop responding and everything comes back to normal once I reboot it from Hypervm.
    So basically I have to reboot the server every once in a few days.
    I continuously keep checking my adsense impressions and when they start getting low I know there is a server problem and try logging in my HyperVM and find the ram always used(mostly 100%) and then I reboot it and all goes back to normal.
    I am looking for a solution to this and I have no idea what is going wrong. :(
     
    newbie191, Nov 25, 2010 IP
  2. madaboutlinux

    madaboutlinux Member

    Messages:
    250
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    43
    #2
    You can set a cronjob as 'root' to reboot your VPS, however, it is not recommended to reboot the vps from within itself as it will end up in the 'mounted' state and you will have to ask your host to reboot it for you.

    See if there is any option in HyperVM using which you can schedule the reboot so that the VPS will come online immediately. Make sure the required services are turned ON in chkconfig so the services will start automatically after the reboot.

    BTW, did you notice the high resource usage after you enabled adsence OR is it an old issue? You should have someone look into your server to see what exactly is using up the resources.
     
    madaboutlinux, Nov 26, 2010 IP
  3. Just A Wag

    Just A Wag Peon

    Messages:
    459
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Have to agree - you really need to find the problem with the server rather than going for a work around - re-booting the server should be the last resort.
     
    Just A Wag, Dec 8, 2010 IP
  4. RonBrown

    RonBrown Well-Known Member

    Messages:
    934
    Likes Received:
    55
    Best Answers:
    4
    Trophy Points:
    105
    #4
    Completely agree with this. By rebooting all you're doing is painting over the cracks while the building is falling down. You need to find out why memory is being used and not released, and fix that.
     
    RonBrown, Dec 8, 2010 IP
  5. BeoR

    BeoR Active Member

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    56
    #5
    Does it happen for long periods of time or just for a few minutes/hours? It might be just maintenance scripts running (ie. logrotate, logwatch, etc...). Things usually go back to normal once they are done.
     
    BeoR, Dec 15, 2010 IP
  6. owsolution

    owsolution Well-Known Member

    Messages:
    290
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    138
    #6
    How much memory is going to cache? Try issuing this command:

    sync; echo 3 > /proc/sys/vm/drop_caches

    and advise if your memory frees up.
     
    owsolution, Dec 20, 2010 IP
  7. aassociatehit

    aassociatehit Well-Known Member

    Messages:
    1,778
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    140
    #7
    agree you have to find the cause of memory usages, instead of doing work around, if you put a cron to reboot, it may not come back online and get stuck in file mount stage, in that case it has to be rebooted manually, and if you are not monitoring your server, than it might be down for long period in that case
     
    aassociatehit, Dec 22, 2010 IP