Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop Heroku Dyno from cycling

I have a Hobby Dyno that hosts an application in Heroku in which users can upload images.

What I've noticed is the Dyno restarts during his cycle causing all images to be gone.

2018-07-27T16:23:09.914767+00:00 heroku[web.1]: Cycling
2018-07-27T16:23:09.915421+00:00 heroku[web.1]: State changed from up to starting

I am aware of solutions that involve a third-party storage or host the app in another platform altogheter.

I am wondering if there is a way to stop a dyno cycle and never make it restart such as is always in the up state?

Thank you.

like image 617
lch Avatar asked Jul 28 '18 11:07

lch


1 Answers

There is no way to prevent dyno cycling. Heroku does this automatically at least once per day.

Heroku's entire design is based on The 12-Factor App, which states that your app's processes are disposable. Heroku accomplishes this (in part) with its ephemeral file system, which is why you must persist files using an external service.

like image 78
Adam McCrea Avatar answered Sep 18 '22 07:09

Adam McCrea