Memory Error/500 Error when migrating from Java 7

2019-07-29 01:20发布

问题:

After Java 7 to 8 migration, your project may exhibit an increased 500 error rate and you may see this error:

Uncaught exception from servlet java.lang.OutOfMemoryError: Java heap space

回答1:

Each application running in the standard environment on Google App Engine has an instance class, which determines its compute resources.

A B2 instance class (or below) may no longer big enough and we recommend upgrading to a B4 instance.

For more information on instance classes, see https://cloud.google.com/appengine/docs/standard/#instance_classes

For instance class implementation details, see https://cloud.google.com/appengine/docs/standard/java/config/appref/#instance_class

For more information on concurrency and latency, see https://cloud.google.com/appengine/docs/standard/java/runtime/#concurrency_and_latency

For more tips on migrating to Java 8 on Google App Engine, see https://cloud.google.com/appengine/docs/standard/java/migrating-to-java8