0

I have an app (online board game) on heroku free hosting. It takes 1 web dyno (NodeJS server) and so far it works fine except one thing: Automatic Dyno Restarts

It doesn't seem to respect 24h rule (yesterday I deployed new patch at 21:00, today it was restarted at 18:00), but generally does it once a day.

I thought - if it's not possible to stop it from restarting at all, maybe I could somehow force dyno restart at night every day?

Restarts are bad for my app because all game state is in memory and if somebody plays it - game is wiped, players need to start all over.

Fen1kz
  • 101
  • 1
  • 1
    This is a problem with your application. You need to keep state in some kind of persistent storage. – Michael Hampton Apr 24 '19 at 17:52
  • Is it really the thing in gamedev? I never read about keeping game state in persistent storage. – Fen1kz Apr 24 '19 at 18:35
  • How else could a game possibly remember anything about your players? – Michael Hampton Apr 24 '19 at 19:05
  • Just like any other game - game state is stored in server memory. My question is about controlling heroku restart. – Fen1kz Apr 25 '19 at 15:58
  • Um, this is really not something you should be arguing about. No game stores persistent state in memory. It's not persistent. Only transient state, for things that are actively happening, is in memory. See our sister site [gamedev.se] for more information. You can't control Heroku restart, so you have to fix your game. – Michael Hampton Apr 25 '19 at 16:00

0 Answers0