5

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.

lch
  • 2,028
  • 2
  • 25
  • 46

1 Answers1

15

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.

Adam McCrea
  • 1,082
  • 8
  • 9
  • 1
    Your processes are disposable, but your data isn't. Your database would be hosted somewhere persistent, such as Heroku's own Postgres offering, Amazon RDS, etc. – Adam McCrea Aug 31 '19 at 12:50
  • What! And they now charge 7 usd per dyno. smh. Thanks for the answer. – corlaez Sep 05 '19 at 20:43