Stop Heroku Dyno from cycling

假装没事ソ 提交于 2021-01-27 05:34:10

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/51570833/stop-heroku-dyno-from-cycling

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!