How does app engine (python) manage memory across requests (Exceeded soft private memory limit)

前端 未结 3 909
忘了有多久
忘了有多久 2021-01-05 10:04

I\'m experiencing occasional Exceeded soft private memory limit error in a wide variety of request handlers in app engine. I understand that this error means th

3条回答
  •  悲&欢浪女
    2021-01-05 10:44

    Point 4 is an invalid asumption, Python's garbage collector doesn't return the memory that easily, Python's program is taking up that memory but it's not used until garbage collector has a pass. In the meantime if some other request requires more memory - new might be allocated, on top the memory from the first request. If you want to force Python to garbage collect, you can use gc.collect() as mentioned here

提交回复
热议问题