On 15/03/2019 17:51, Shankar P S wrote:
> @Mark Thanks for the tip. I compared the 2 heap dumps. For the same
> server.xml config, 8.5.38 version of Tomcat creates 3 StandardContext
> instances. I see that these 3 objects have their own hierarchy.
> ----
> *Tomcat 8.5.38 - 3 instances of StandardContext*
> 
> First instance   originalDocBase "/var/www/tomcat/webapps/ROOT.war",
> docBase "ROOT", displayName "/", workDir "work/Catalina/localhost/ROOT"
> 
> Second instance  docBase ROOT.war, workDir "work/Catalina/localhost/ROOT"
> 
> Third instance   originalDocBase "/var/www/tomcat/webapps/ROOT.war",
> docBase "ROOT", displayName "/", workDir "work/Catalina/localhost/ROOT"

Odd. Worth checking the state field for each of those instances.

Check the logs. You should see start (and hopefully some stop) messages
for those.

Is it possible the app has been reloaded?

Mark


> 
> 
> *Tomcat 8.5.35 - 1 instance of StandardContext*
> 
> First instance   originalDocBase "/var/www/tomcat/webapps/ROOT.war",
> docBase "ROOT", displayName "/", workDir "work/Catalina/localhost/ROOT"
> -----
> The server.xml & context.xml is the same and they have very few custom
> configs. How can I debug from here?
> 
> 
> 
> On Fri, Mar 15, 2019 at 1:30 AM Mark Thomas <ma...@apache.org> wrote:
> 
>> On 14/03/2019 21:15, Shankar P S wrote:
>>> Version - Tomcat 8.5.38
>>> OS - Centos 7.6
>>> JVM - openjdk 1.8, 4 CPU
>>>
>>> We recently upgraded an existing server running a Spring 3.0 web app from
>>> Tomcat 8.5.35 to 8.5.38.
>>>
>>> After the upgrade, I noticed OutOfMemory exceptions several times.
>>> Increasing the heap size (-Xmx) several times upto nearly twice (from 6
>> GB
>>> to 10 GB) helped bring the problem under control.
>>>
>>> I was worried about a memory leak and so took a heap dump. Upon
>> inspection
>>> I noticed that there were 2 copies of 2 large HashMap objects that we use
>>> as a cache for fast lookup. I noticed that this was because there were 2
>>> instances of org.apache.catalina.loader.ParallelWebappClassLoader.
>>>
>>> Downgrading to 5.3.35, reduced the heap size to half and the problem was
>>> gone. In the new heap dump, there was only one instance of
>>> ParallelWebappClassLoader.
>>>
>>> My question is - why does Tomcat 5.3.38 create 2 instances of
>>> ParallelWebappClassLoader, while  5.3.35 creates only one?Is there a way
>> to
>>> conigure the number of instances of  ParallelWebappClassLoaderwhen
>>> upgrading to 8.5.38?
>>
>> That sounds like you have double deployment. That normally means
>> configuration error.
>>
>> Since you have a heap dump, look for StandardContext instances and then
>> look at the value of docBase for each. That should give you some
>> pointers to what is happening.
>>
>> Mark
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to