How to add JVM parameters on azure app service

Deshmukh, Vijit 496 Reputation points
2022-02-11T11:07:44.637+00:00

Hi,
We are using Azure App service for deployment microservices.

How I can add JVM parameters e.g. Xmx on Azure App Service.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,841 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. ajkuma 22,241 Reputation points Microsoft Employee
    2022-02-14T07:34:39.957+00:00

    @Deshmukh, Vijit , Thanks for good question. Firstly, Apologies for the delayed response from over the weekend.

    Based on my understanding of your question, to set JVM runtime options (or allocated memory), you can create an app setting named JAVA_OPTS with the options. App Service passes this setting as an environment variable to the Java runtime when it starts.

    In the Azure portal, under Application Settings for the Web app, create a new app setting named JAVA_OPTS (for Java SE) or CATALINA_OPTS (for Tomcat) that includes other settings, such as -Xms512m -Xmx1204m. Kindly refer this doc section 'Set Java runtime options' for more info.

    ---------
    To benefit the community find the right answers, please do mark the post which was helpful by clicking on Accept Answer’ & ‘Up-Vote’.

    2 people found this answer helpful.