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.
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.