Tomcat5 not releasing memory

  • 3073104
  • 15-Jan-2008
  • 17-Aug-2012

Environment

Novell iManager 2.7

Situation

Non-OES instances of iManager 2.7 use Tomcat5. It has been found that Tomcat5 is not releasing memory after logging out of iManager 2.7. See cases below:

Case 1:

Ran an automation script which logs into iManager 2.7 and then does a proper logout, following Logout link in iManager. (script did 50 logins with no delay.)

Observed Tomcat5 memory usage went from 50mb to 89mb.

Case 2:

Ran another automation script which logs into the same iManager 2.7 and the logs out abnormally, by closing the Browser. (script did 50 logins with no delay.)

Observed Tomcat5 memory usage went from 50mb to 157mb (because eDirectory connection still exist).

In both scenario's Tomcat manages connections effectively and there were not any performance issues observed.

Resolution

For more information on this Tomcat bug please see:
http://issues.apache.org/bugzilla/show_bug.cgi?id=44237

Note: Restarting Tomcat5 will cause memory to be released by Tomcat.

Note: Increasing the memory setting for Tomcat by changing the following settings may help.
Each environment is different and Tomcat's default configuration may need to be modified.  Try slowly increasing these settings until you have the desired result.

Minimum heap size: -Xms
Maximum heap size: -Xmx

Default settings for iManager 2.7 on NetWare
CATALINA_OPTS= -Xms160m -Xmx256m

Default settings for iManager 2.7 on Linux
JAVA_OPTS="-Xms256m -Xmx512m -Xss512k"

Default settings for iManager 2.7 on OES2 Linux
CATALINA_OPTS=""
 
Default settings for iManager 2.7 on Windows
256 - XMS = initial memory pool
512 - XMX = maximum memory pool
 

These settings can be changed in the following locations:

NetWare 6.5
Edit SYS:\tomcat\5.0\BIN\TOMCAT5.NCF
Stop Tomcat5 (from the server console type "TC5STOP")
Start Tomcat5 (from the server console type "TOMCAT5")

Stand alone Linux (non OES)
Edit /etc/opt/novell/tomcat5/tomcat5.conf
Stop Tomcat5 (from a terminal execute "/etc/init.d/novell-tomcat5 stop")
Start Tomcat5 (from a terminal execute "/etc/init.d/novell-tomcat5 start" )

OES2 Linux
Edit /etc/sysconfig/j2ee, and find CATALINA_OPTS=""
Edit this line to look like the following:
CATALINA_OPTS="-Xms256M -Xmx512M"
Stop Tomcat5 (from a terminal execute "/etc/init.d/novell-tomcat5 stop")
Start Tomcat5 (from a terminal execute "/etc/init.d/novell-tomcat5 start" )
 
Windows
Go to the Tomcat\bin directory
Run tomcat5w.exe
Go to JAVA tab
Set the min and max values then click OK
Restart Tomcat
 
 



 

Status

Reported to Engineering