title: How to properly set the JVM options in a flexible GAE application
body: <p>the following is my app.yaml file for a GAE flexible Java 8 / Jetty application.  </p>
  
  <pre><code>runtime: java
  env: flex
  manual_scaling:
    instances: 1
  
  runtime_config:  # Optional
    jdk: openjdk8
    server: jetty9
  
  resources:
    cpu: 2
    memory_gb: 4.0
  
  env_variables:
    JAVA_HEAP_OPTS: -Xms3072M -Xmx3072M
  
  health_check:
    enable_health_check: False
  
  handlers:
  - url: /.*
    script: this field is required, but ignored
  </code></pre>
  
  <p>For some reason the JAVA_HEAP_OPTS value is not used when deploying the app.  A least I don't think it's used, because when I SSH into the docker container, and run the following command, the memory values are much less.</p>
  
  <pre><code>java -XX:+PrintFlagsFinal -version | grep -iE 'HeapSize|PermSize|ThreadStackSize'
  </code></pre>
  
  <p>Can someone please tell me what's going or what I need to do differently?</p>
  
  <p>Thanks</p>