- Plesk Onyx for Windows
- Apache Tomcat service crashes on every attempt to access the website;
- The following error can be found in
C:\Program Files\Apache Software Foundation\Tomcat 7.0\logs\catalina.xxxx-xx-xx.log:
CONFIG_TEXT: org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [jsp] in context with path [/intranet] threw exception [javax.servlet.ServletException: java.lang.OutOfMemoryError: Java heap space] with root cause
java.lang.OutOfMemoryError: Java heap space
The specified heap size is insufficient for the application.
- Connect to the server via RDP;
- Start Tomcat7w GUI application for monitoring and configuring Tomcat services by clicking at
C:\Program Files\Apache Software Foundation\Tomcat 7.0\bin\Tomcat7w.exe
- In Java Options field in Java tab add following directives:
Note: The mentioned settings allocate 2 GB memory to the start Java heap, 6 GB for the maximum heap size. It should be changed according server's needs.
- Save the changes and restart Tomcat Apache service at Start > Services:
- Start JAVA application at Home > Domains > example.com > Java Application page
Note: There is a probability that application memory leak can cause running out of memory. If the issue occurs after increasing of heap option consider to review web application code to find what could cause memory leaking.