Change Java heap size in Tomcat in Azure App Service

Premise

Azure WebApp server type is Windows

operation

  1. Open App Service on the Azure web console
  2. Open "Advanced Tools" among Development Tools (Kudu)
  3. Open "CMD" from Debug Console (can be used as GUI, not just command line)
  4. Since "D: \ home" is open by default, open "D: \ home \ site \ wwwroot" (also possible with mouse operation)
  5. Click the "+" to the right of [wwwroot] and select "New File"
  6. Create a file called "web.config" and do the following: Check "% AZURE_TOMCAT90%" because it depends on the version of TOMCAT. (The SET command displays a list of environment variables, so you can check it there.)
  7. Restart the app
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <handlers>
        <add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
    </handlers>
    <httpPlatform processPath="%AZURE_TOMCAT90_HOME%\bin\startup.bat" arguments="">
      <environmentVariables>
        <environmentVariable name="JAVA_OPTS" value="-Xmx1500m -Xms1024m -Djava.net.preferIPv4Stack=true" />
      </environmentVariables>
    </httpPlatform>
  </system.webServer>
</configuration>

that's all.

Recommended Posts

Change Java heap size in Tomcat in Azure App Service
Azure App Service (Windows) Tomcat configuration changes
Rock-paper-scissors app in Java
Azure functions in java
Get Azure App Service for Java Configuration with System.getEnv ()
Change java encoding in windows
Create Azure Functions in Java
[Java] Deploy the Spring Boot application to Azure App Service
Run Java application in Azure Batch
Build Redmine on Azure App Service
How to change app name in rails
Deploy Java Servlet app locally on Tomcat
Try calling the CORBA service in Java 11+
Try Health Check on Azure App Service.
Change List <Optional <T >> to Optional <List <T >> in Java
Create a TODO app in Java 7 Create Header
Add Document to Azure Search Service (Java)
Try making a calculator app in Java
Deploy Java web app to Azure with maven
Measure the size of a folder in Java
Try Azure Service Fabric (Java) on Mac-Local Environment
Dynamically change private static final fields in Java
Change paragraph text color in Java Word documents