I have a simple python App Engine application with low traffic (3 hours of instance activity per day more or less). I'm using everything below the free tier provided and I have:
- F1 Instances with auto-scaling
- 1/2 MB of Memcache
- I make "heavy" use of
ndb.get_multi()
(with 400 entities per request only for a small amount of requests, but these 400 entities weigh only 3MB)
The problem is that I get the Exceeded soft private memory limit of 128 MB with 131 MB after servicing 93 requests total
error randomly once every 2/3 days but there is no request the app can't process singularly.
I've tried to call gc.collect()
at the end of each request but the amount of memory keeps increasing event after servicing the request.
How can I solve this without upgrading to higher performing instances (F2)?
Thanks!