Reputation: 4165
I am getting the following message when running my GCP App Engine service:
Exceeded soft memory limit of 256 MB with 257 MB after servicing 0 requests total.
Consider setting a larger instance class in app.yaml.
Weird thing is that I increased the app.yaml
memory constraints to
runtime: java11
instance_class: F1
handlers:
- url: /.*
script: this field is required, but ignored
env_variables:
JAVA_TOOL_OPTIONS: "-XX:MaxRAM=1g -XX:ActiveProcessorCount=2 -Xmx512m"
GAE_PROFILER_MODE: "cpu,heap"
service: "my-service"
And when the service restarts, the first line I see is:
Picked up JAVA_TOOL_OPTIONS: -XX:MaxRAM=1g -XX:ActiveProcessorCount=2 -Xmx512m
Upvotes: 1
Views: 570
Reputation: 4630
Your application need run on an bigger instance.
I recommend you upgrade the service instance_class, for example you can use an F4 or F4_HIGHMEM instance.
In this link you could find more information about the specs for every instance class.
Keep in mind that this change will be impact your billing, int this link you check the pricing for every instance_class .
Upvotes: 2
Reputation: 2246
You are misread the error message. Your instance class is F1
.
In the documentation, the F1 instance class has a memory limit of 256Mo and you are asking for more memory, thus your issue.
You have to choose an other instance class if you want to have an higher memory limit (like F4 for example).
Upvotes: 3