I have a staging server hosted on heroku, I just want to bring it down, but not destroy the app. How can I do it? Do I have any command like 'heroku stop' like 'heroku restart' for restarting?
OR
Is there a way to automate the server to turn off itself when it exceeds the 750 hr free usage?
Actually I don't want the server so I am trying to stop it, or leave it for the free hours.
You can also try http://kaffeine.herokuapp.com (made by me), it's made for preventing Heroku apps to go to sleep. It will ping your app every 10 minutes so your app won't go to sleep. It's completely free.
When Do Apps Sleep? When an app on Heroku has only one web dyno and that dyno doesn't receive any traffic in 1 hour, the dyno goes to sleep. When someone accesses the app, the dyno manager will automatically wake up the web dyno to run the web process type.
You can scale individual non-web processes down to zero quite happily:
$ heroku ps:scale worker=0
$ heroku ps:scale resque=0
etc...
and web to 1:
$ heroku ps:scale web=1
As Mischa says, you get one free dyno running, so leave your 1 web dyno running (I'm not sure you can stop the last web process)
You can put it under maintenance, which stops it but doesn't delete it:
heroku maintenance:on
More info: https://devcenter.heroku.com/articles/maintenance-mode
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With