VPS problem - server shut down.
#1
It seems that the VPS shuts down every single day at the same time. I would like to make it so when the VPS comes back online, the server will start running by itself (24/7). If someone could teach me how to do this, I'd be grateful. I can give you my information in PM's if you could do it for me.

Thanks again.
Thanks given by:
#2
dude, get rid of that vps, if it shuts down every day, its shit
whats the host?
Thanks given by:
#3
(23 Jul 12, 09:49PM)Jg99 Wrote: dude, get rid of that vps, if it shuts down every day, its shit
whats the host?

vpsfx
Thanks given by:
#4
LOLOLOLOLololOLOLOLOLOLOLOL get virpus.com
Thanks given by:
#5
Thank you for your help Jg99!

If anyone else could attempt as great as James here, that would be appreciated!
Thanks given by:
#6
Google "Linux startup items" and see if that leads you anywhere. If you need help with a sh script to boot the servers, I can help with that.

I would open a ticket with your provider asking them why they do that, and see if you can fix it. If you can't, it might be worth finding a new provider.
Thanks given by:
#7
Jg99, its actually a very fast VPS. It shuts down once a day so fuck you. A lot of good servers have these problems.
Thanks given by:
#8
Seriously? "Now with extra high availability, reboots only once per day".

But if you really want to stay with them, adapt a template daemon start script and use whatever method your distro provides to start it at boot time.
Thanks given by:
#9
(23 Jul 12, 10:54PM)bballn45 Wrote: Jg99, its actually a very fast VPS. It shuts down once a day so fuck you. A lot of good servers have these problems.

dude, my vps has never been rebooted except by me, and my host is pretty good. vpsfx sucks if a server reboots, i have players all the time, so uptime DOES matter. and do not say f*** you to me again on the forums.
Thanks given by:
#10
(24 Jul 12, 01:09AM)Jg99 Wrote: dude, my vps has never been rebooted except by me, and my host is pretty good. vpsfx sucks if a server reboots, i have players all the time, so uptime DOES matter. and do not say f*** you to me again on the forums.
All right, you.
Cemer did not come here to hear that he should drop the VPS he and whop just purchased yesterday. He was asking how he could solve his problem, not how he could replace it (and possibly encounter even MORE problems).
ANYWHO.
Cemer, pardon me if this is a foolish question, but I do hope you're at least able to start your server manually? At least thats a good start ;)
EDIT: Also, james, having many players doesn't make the server good - look at douze 24/7.
Thanks given by:
#11
Create a bash script with

#!/bin/bash
#make-run.sh
#make sure a process is always running.

export DISPLAY=:0 #needed if you are running a simple gui app.

process=YourProcessName
makerun="/usr/bin/program"

if ps ax | grep -v grep | grep $process > /dev/null
        then
                exit
        else
        $makerun &
        fi
exit

Add a cronjob to run it every 5 mins or so
Thanks given by:
#12
Nice script! I have also used cron to solve this issue but no where near as elegantly as above. You could (if the server shuts down at the same time each day) just insert a restart command in your cron daily, that worked for me :)

@JG please stop advertising VPS services in threads, also appologies if this got a little technical for you...
Thanks given by:
#13
(24 Jul 12, 02:20AM)ShadowFlameZ Wrote: Cemer did not come here to hear that he should drop the VPS he and whop just purchased yesterday. He was asking how he could solve his problem, not how he could replace it (and possibly encounter even MORE problems).
Well, if you ask for help, you might not always hear what you wanted to hear. Point is, the best solution for this kind of problem is to switch to a different host. Having a VPS reboot once a day is simply not acceptable, not if you pay for it. The only time a virtual server should reboot is when it (or the host machine) gets a kernel upgrade/security update (and not even than if you're using ksplice), or when it's migrated.
/rant

That kind of cron hack isn't really the optimal solution, more like a "gets the job done" one. It's okay as a temporary kludge for processes that crash frequently (note temporary - if something crashes all the time, either report a bug or get rid of it). If you just want to make sure something is run whenever the server boots, use an init script.
Thanks given by: