2
votes

I have a resident gae backend instance and I read that they never shutdown by themselves. But as I can see from the logs my backend instance is shutting down sometimes. Sometimes the instance lives for 20 min and sometimes for 4 h. How can I prevent my backend instance from shutting down. This is a problem, because I want to save as much as possible in the memory and not in the ds.

1
ANY instance can shutdown at any time. Ideally they tell you about it with a shutdown hook, so you can save your data, but sometimes machines just break and you lose your instance. So you are not going to have a good time trying to avoid the datastore if you don't want to lose data.Paul Collingwood
The problem is I don't know if I have enough time to persist my data. I have a loop which runs until the gae is shutting down, but nevertheless the logs says Process terminated because the backend took too long to shutdown. And like I said befor I don't understand why the gae is shutting down and seconds after it start the process again (without any /_ah/stop between).Daniel Müssig

1 Answers

1
votes

backends do shutdown, check the docs. If possible gae will send you a notification and you will have a tiny amount of time to react. Its meant for saving a tiny state like a single ds entity, definitely not for saving a huge amount of data in ram. That's not a good use of a backend.