Tomcat creating dump files.

We just upgraded 2 week s ago from XI3.1 to 4.2 SP6 patch 4. Today we had a problem with the Tomcat web server creating a dump file and running away with the CPU. This causes BILaunchPad and the CMC to become unresponsive and unusable. I restarted Tomcat but it takes a long time for Tomcat to redeploy all the web files so the system was unavailable for nearly 30 minutes. We had this problem in XI3.1 but I could weekly restart Tomcat to prevent the problem because in XI3.1 the webapps folder is much smaller and only took about 1.5 minutes to redeploy so there was little downtime. In 4.2 SP6 this is going to be a huge problem if we can’t figure a way to mitigate the downtime. Has anyone else faced this problem or know how to deal with it?


richardcottave (BOB member since 2006-03-30)

[Moderator Note: Moved from General Discussion to Server Administration, Installation, Upgrades -> XI Server Discussion]


Marek Chladny :slovakia: (BOB member since 2003-11-27)

Your dump files are most likely being generated because you have processes running out of heap memory. You need to analyze the dump file to figure out which one and increase the memory setting for them if possible.

You may need to increase the heap size for Tomcat.

I added something to our configuration that includes the process ID in the log file names. This has helped to identify which process generated the heap dump because there will be the same process ID in the heap dump file as in the process log file. I can’t for the life of me find where I made the change or the documentation that caused me to make the change.:frowning: :oops: I’ll probably run across when I’m not trying to find it.

Thanks for the info JohnB. I am going to increase the heap size in the Tomcat config.


richardcottave (BOB member since 2006-03-30)

Please let us know how you get on, richardcottave.


Nick Daniels :uk: (BOB member since 2002-08-15)

This Sunday Feb 3 I will remove the entry from Tomcat configuration that makes it generate dumps on out of memory and I will increase the heap size to 6144. Does anyone know if it’s possible to eliminate some folders from getting deployed when Tomcat starts.? In other words are some folders static enough that they don’t need to be deployed every time Tomcat starts?


richardcottave (BOB member since 2006-03-30)

I was able to elimnate folders from being deployed into Tomcat.

For example:
I removed the folders from the %TomcatDir%\webapps directory, such as the bipodata application.
I then took the folder in the %BOEDir%\warfiles\webapps directory and moved them into a compressed folder.

The application no longer deploys to Tomcat and is not loaded when Tomcat starts. I verified this with Tomcat Manager.

Here is some PowerShell script that will do these steps for you:

# bipodata Application -------------------------------------------------------------------------------------------
# Backup and remove application from BOE directory
Compress-Archive -DestinationPath $BOEDir\warfiles\webapps\bipodata.zip -Path $BOEDir\warfiles\webapps\bipodata\* -CompressionLevel Optimal
Remove-Item -Path $BOEDir\warfiles\webapps\bipodata -Force -Recurse
# Remove application from Tomcat directory
Remove-Item -Path $TomcatDir\webapps\bipodata -Force -Recurse

It is a recommendation from SAP Suppor that you periodically clear you Tomcat cache also. This is supposed to help with that. I use this PowerShell script as part of our reboot process to clear the Tomcat cache. It creates a backup also.

#Remove the previous Tomcat cache backup
Remove-Item -Path $TomcatDir\work\Catalina\localhost.bu -Recurse
#Stop the Tomcat service
Stop-Service -Name BOEXI40Tomcat -NoWait 
Start-Sleep -Seconds 10
#Backup the existing Tomcat cache
Rename-Item -NewName $TomcatDir\work\Catalina\localhost.bu -Path $TomcatDir\work\Catalina\localhost

Increasing the Max memory pool for Tomcat from 2048MB to 6144MB made a huge difference in how fast Tomcat deploys the web files. Previously it was taking 30+ minutes. After the increase it deployed in less than 7 minutes.


richardcottave (BOB member since 2006-03-30)