Q:

GCP still crashing due to memory limits

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

A:

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).