Background:
Windows Server 2012 R2- 64 bit
16 GB RAM
Tomcat 8
Java 8
I am running a java application on Tomcat 8. I am facing high memory usage problem. The memory usage goes up to 95% and server crashes. No problem with CPU usage.
I am setting JAVA_OPTS in tomcat\bin\catalina.bat
set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG% -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:PermSize=512m -XX:+UseParallelGC"
NOTE: XMS and XMX is set from catalina UI.
I understand, there is no PermGen concept in Java 8 so I tried below JAVA_OPTS with -XX:MaxMetaspaceSize=512m too
set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG% -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:MaxMetaspaceSize=512m -XX:+UseParallelGC"
But no luck.
Interesting thing:
The memory used by tomcat process remain around 3.5 GB but memory usage goes up to 15 GB. All the remaining processes add up to 1 GB only. I have no clue which process is consuming remaining 9-10 GB.
The system memory goes up and here is the snap.
Any thoughts?
Thanks.