tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan D." <...@dubomail.com>
Subject Re: Out of Memory Errors when upgrading from 5.0.27 to 6.0.14
Date Thu, 07 Feb 2008 21:14:46 GMT
Most of the advice that I received on this topic was pretty much the same: 
Use a profiler to determine what is using the heap.

I went out and got a demo copy of yourkit as Filip suggested, and ran it 
against a 512MB heap dump (lowered max heap to that, and
used the heap that was dumped on OOME).

Well over half of the heap was consumed by 
java.util.HashMap(.HashMap$Entry[]).

This lead me back to my suspicion that the issue may lie with the number of 
directories that are created in the tomcat work/engine/application 
directory.

The following example explains the difference in behavior between Tomcat 5 
and Tomcat 6 that I am seeing:

Customer has the following directory structure:

/home/user/html
\_ WEB-INF/
|    \_ classes/
|    \_ lib/
\_ images/
\_ movies/
\_ mp3s/
\_ blog/
\_ new_application.war

Now, in Tomcat 5, they would have a work directory structure of the 
following:
/{tomcat.home}/work/{engine.name}/
    \_ ./application_name
        \_  _ (the directory name is simply “_”)
        |     \_ tldCache.ser
        \_   new_application
        \_ tldCache.ser

Tomcat 6, however, would set it up as follows:

./application_name
\_  _
\_ new_application
\_ images/
\_ movies/
\_ mp3s/
\_ blog/


Add in a few more directories for flair (say, for subdomains / aliases / 
other applications), and we can see that the number of these directories 
that are created gets out of hand quickly.

To put numbers on it, for Tomcat 5, we have a total of ~11,000 files and 
directories in the {tomcat.home}/work/{engine.name} directory and 
subdirectories.  In Tomcat 6, it fails on OOME at around 27,000 directories.

So, I suppose my question is, is this behavior intended?  Is there a config 
option I can use to disable it at all, or do we simply have to reduce the 
number of applications that are being run under the new version?

As a side note, I was able to eventually get Tomcat to start, once I removed 
a number of applications that had the highest count of directories that were 
created in the work directory structure.

Also, we do hope to move to 64bit versions soon, but they aren't here yet, 
so I only have the 32 bit to work with.

Thanks for your help,

Dan


From: "Christopher Schultz" <chris@christopherschultz.net>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Dan,
>
> (While others are handling your primary question, I thought I'd mention
> a couple of things)

> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message