How to customize JVM options on Azure Functions - Azure/azure-functions-java-worker GitHub Wiki
Customize JVM options on Azure Functions
-
Dedicated and Premium Functions: Create an app setting named
JAVA_OPTS
with a value of your customizing parameters for example “-Dexample=true”. If you already have the JAVA_OPTS app setting set, just append “-Dexample=true” to the existing value. -
Consumption Functions: Create an app setting named
languageWorkers__java__arguments
with a value of “-Dexample=true”.
More examples can be find here: https://github.com/Azure/azure-functions-java-worker/issues/474
Case - Update JVM heap size
Dedicate plan (P1V2)
- default (without setting
JAVA_OPTS
): heap size is 711589888 bytes
- set
JAVA_OPTS
to-Xmx2g
: heap size is 2075918336 bytes
The sample apply to appsetting languageWorkers__java__arguments
on consumption plan.