tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan D." <...@dubomail.com>
Subject Out of Memory Errors when upgrading from 5.0.27 to 6.0.14
Date Mon, 04 Feb 2008 23:46:01 GMT
Hello all,

I'm currently working on upgrading our systems from using Tomcat 5.0.27 to 6.0.14.

The upgrades are not being done in place (ie, we will have both systems out there, and will
be doing migrations to the new version).  I have been able to resolve most of the issues we
have run into thus far, however, I am now somewhat stuck, and am hoping someone here may be
able to help.

About the environment:
Shared hosting, with approximately 300-600 users on a server, with an average of ~1500 applications
(many users have a few applications).  Not all users are utilizing any java at all, however.
 Apache 1.3.33 is running and configured to serve static content.

The older servers with TC5 on them have ~6GB of available RAM, new servers for TC6 have 8GB
of RAM.  

Customer content is stored on a remote NAS server.

While I understand that having the <Host> and <Context> declaration for all users
listed in server.xml, that is how we have it currently configured.  

About the problem:
When tomcat is started and running on our existing 5.0.27 server, it uses approximately 1GB
of RAM, and successfully runs all applications without issue.

When starting tomcat on the 6.0.14 server with the _exact_ same content, however, it runs
out of heap space.  This is the issue I'm running into right now that I can't seem to find
any answers about.  Attempting to increase the available heap results in an error allocating
memory upon startup.


The output from jmap seems to show that the majority of the heap/memory is being consumed
by character arrays.

When viewing the {tomcat.home}/work/{engine}/{application} directory, it appears there is
a fair difference on how these are loaded into tomcat.

On Tomcat5, this directory consists of only directories that contain a WEB-INF directory in
them, and each of those have a tldCache.ser file.

On Tomcat6, this directory consists of all directories located inside a directory that contains
a WEB-INF directory.

For example:
Tomcat 6:
[root@servername ]# pwd ; find .
/web/tomcat/work/hosting/sitename.com
.
./_
./cgi
./stats
./php_uploads
./images
./ad
./Video
./Templates
./Flv
./Songs
./newwebsite
./old files
./manager

Tomcat5:
[root@servername ]# pwd; find .
/web/tomcat/work/hosting/sitename.com
.
./_
./_/tldCache.ser

And the contents of the actual home directory are:
[root@servername html]# find . -maxdepth 1 -type d
.
./cgi
./stats
./php_uploads
./WEB-INF
./images
./ad
./Video
./Templates
./Flv
./Songs
./newwebsite
./old files

I have read http://wiki.apache.org/tomcat/FAQ/Memory and attempted all the suggestions there,
to no avail.

Thus, it appears that on Tomcat6, it is attempting to load all of these paths into memory,
and eventually runs out.  Tomcat5 did not load all of the paths to directories without applications,
and thus uses less of the heap.

Does it seem like I am on the right track here?  Have others encountered this in the past?
 Is there a way to prevent this behavior within Tomcat 6?

I thank you for any insight you can provide on this issue.

Sincerely,
Dan D.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message