I think there is a memory leak in the ndb library but I can not find where.
Is there a way to avoid the problem described below?
Do you have a more
A possible workaround is to use context.clear_cache() and gc.collect() on get method.
def get(self):
for _ in range(10):
for entity in DummyModel.query().iter():
pass # Do whatever you want
self.response.headers['Content-Type'] = 'text/plain'
self.response.write('Hello, World!')
context = ndb.get_context()
context.clear_cache()
gc.collect()