What is the “soft private memory limit” in GAE?

前端 未结 2 751
栀梦
栀梦 2020-12-06 09:34

A user of my application attempted to send a file as an email attachment using my application. However, doing so raised the following exception which I\'m having trouble dec

相关标签:
2条回答
  • 2020-12-06 10:08

    I assume you are using the lowest-class frontend or backend instance. (F1 or B1 class) Both have 128 MB memory quota, so your app most likely went over this quota limit. However, this quota appears to be not strictly enforced and Google have some leniency in this (thus the term soft limit), I had several F1 app instances consuming ~200MB of memory for minutes before being terminated by the App Engine.

    Try increasing your instance class to the next higher-level class (F2 or B2) that have 256MB memory quota and see if the error re-occurs. Also, do some investigation whether the error is reproducible every time you send e-mail with attachments. Because it's possible that what you are seeing is the symptom but not the cause, and the part of your app that consumes lots of memory lies somewhere else.

    0 讨论(0)
  • 2020-12-06 10:11

    The "soft private memory limit" is the memory limit at which App Engine will stop an instance from receiving any more requests, wait for any outstanding requests, and terminate the instance. Think of it as a graceful shutdown when you're using too much memory.

    Hitting the soft limit once in a while is ok since all your requests finish as they should. However, every time this happens, your next request may start up a new instance which may have a latency impact.

    0 讨论(0)
提交回复
热议问题