I want to restart a nodejs app to change its ip. How would I do this within the app itself? I have tried forcing a crash however if the app crashes twice within ten minutes, then heroku will restart the dyno ten minutes after the first crash.
In addition to scheduled cycling, dynos are automatically restarted with every new code release, add-on change, or config vars change. They can also be restarted manually.
If you wish to stop a running one-off dyno, use heroku ps:stop with its name. A one-off dyno will not stop if you issue heroku ps:restart on your application.
If you have the Heroku CLI installed, you can run heroku restart
in the folder of your application or run heroku restart --app application_name
.
If you don't have it installed, you can find information about it here.
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