cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Tomcat high CPU issue

Former Member
0 Likes
3,331

Hi,

We are on BO 4.2 SP2. We have recently upgraded and since then we are experiencing and issue with Tomcat8.

Tomcat keeps reserving more and more memory (at least from we can see in windows Task Manager). Every other day it reaches around 2GB of memory and then it starts paging. CPU goes over the roof and we can´t even restart Tomcat, we need to kill it and start it instead.

We have modified the Tomcat settings Xmx and Xms to 4096 and restarted Tomcat but it seems that it can´t go beyond 2GB. We are on a windows server 2012 R2 64bits with 32GB of RAM available.

Has anyone encountered this scenario that can give us any clue?

Many thanks,

Sergio

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

HI Sergio,

Since there are certain parameters which are no longer used in the Tomcat 8 as compare to Tomcat 7 there is one important parameter is to clean the garbage memory.

Follow below options to add it to the java command line option :

  • Remove the paralleroldGC parameter and add the parameter : -XX:+UseParallelGC
  • Remove the permsize as it is no longer supported in tomcat 8.
  • Check if you have minimum 4 CPU core installed.

Regards,

Mahak

Former Member
0 Likes

Hi Mahak,

Thanks for your post. I have done the two changes you mention. We have a 2 CPU core, but I can´t see how that can have any effect on an error like this. I´ve had to restart tomcat again this morning, but the point in time that tomcat crashes, I can´t see any particular stress on the server.

The error in Tomcat was:

Aug 28, 2016 9:18:37 PM org.apache.tomcat.util.net.NioEndpoint$SocketProcessor doRun

SEVERE:

java.lang.OutOfMemoryError: Compressed class space

Regards,

Sergio

Former Member
0 Likes

Hi Sergio,

When the Tomcat crash occurs, if 'Exception in thread thread_name: java.lang.OutOfMemoryError: Compressed class space' has been output in Tomcat std.out log, then increasing CompressedClassSpaceSize to turn off UseCompressedClassPointers would be the solution.

However, please keep in mind that Tomcat 8 no longer uses MaxPermSize but MaxMetaspaceSize, so before adjusting CompressedClassSpaceSize, defining MaxMetaspaceSize is necessary. (See KB 2297866)

Cheers,
Moslem

Answers (2)

Answers (2)

Former Member
0 Likes
Former Member
0 Likes


Hello Sergio,

Check the following SAP Notes :

2075671 - Best Practice: How to identify Tomcat crash, unresponsive or hanging issue

2297866 - Tomcat8 no longer uses Permsize and MaxPermsize

Regards.