axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Annesley" <james.annes...@infoshare-is.com>
Subject RE: Memory leak in Tomcat
Date Thu, 02 Feb 2012 11:15:55 GMT
Hi,

I am now starting Tomcat with the parameters suggested below and it copes
with a redeployment.
Tomcat heap:
Size: 151,126,016 B

Used: 104,701,448 B

Max: 2,118,123,520 B

Tomcat perm gen:
Size: 85,262,336 B

Used: 85,148,344 B

Max: 85,983,232 B

It adds about 20MB to perm gen every redeployment. Please see my other
reply.

I'll try your suggestions,

Thanks.

-----Original Message-----
From: Pid [mailto:pid@pidster.com] 
Sent: 02 February 2012 11:00
To: java-user@axis.apache.org
Subject: Re: Memory leak in Tomcat

On 01/02/2012 17:10, Moises Alberto Lindo Gutarra wrote:
> For this type of error you must tuning your apache tomcat for example like
this:
>  -server -Xms2048m -Xmx2048m -XX:PermSize=128m -XX:MaxPermSize=256m in 
> Environment Variable JAVA_OPTS into catalina.sh or catalina.bat

Eh?  Why will increasing the memory fix a ThreadLocal cleanup problem?


> 2012/2/1 James Annesley <james.annesley@infoshare-is.com>:
>> Tomcat 7.0.25 x64
>> RAM= 8GB
>> CPU = 8xCPU
>> Java = jdk1.6.0_25 x64
>>
>> I am looking at the tomcat instance in visualvm. I have got eclipse 
>> open which takes 1 GB. PermGen is close to max. It ran out of PermGen 
>> when I redeployed.

You mention Eclipse, but you don't say how much memory Tomcat is consuming,
or is configured to use.  Increasing PermGen will just delay the leak.

If the application is in development, increasing PermGen may allow you to
reload the application without an OOM, while Tomcat cleans up the thread
locals & renews the threads after a short delay.  I'd recommend configuring
a small number (5) of threads during development.


Do you have the ThreadLocalLeakPreventionListener configured in your
server.xml file?

 
http://tomcat.apache.org/tomcat-7.0-doc/config/listeners.html#ThreadLocal_Le
ak_Prevention_Listener_-_org.apache.catalina.core.ThreadLocalLeakPreventionL
istener

See also 'renewThreadsWhenStoppingContext':

 http://tomcat.apache.org/tomcat-7.0-doc/config/context.html

If you need assistance with this, ask at the Tomcat Users mailing list.


p

>> Is this enough info?
>>
>> James
>>
>>
>> -----Original Message-----
>> From: Moises Alberto Lindo Gutarra [mailto:mlindo@gmail.com]
>> Sent: 01 February 2012 16:31
>> To: java-user@axis.apache.org
>> Subject: Re: Memory leak in Tomcat
>>
>> can you tell us your tomcat memory configuration and harware ram, 
>> cpu, type
>> (32 or 64 bits) characteristics???
>>
>> 2012/2/1 James Annesley <james.annesley@infoshare-is.com>
>>>
>>> Hi,
>>>
>>>
>>>
>>> I have an XML beans based AXIS 2 1.6.0 stub. After using the 
>>> client’s UI
>> for a short period of time – say a few minutes – having un-deployed 
>> the web app I get about 50 or so messages as follows:
>>>
>>>
>>>
>>> 01-Feb-2012 16:21:48 org.apache.catalina.loader.WebappClassLoader
>>> checkThreadLocalMapForLeaks
>>>
>>> SEVERE: The web application [/xxxx] created a ThreadLocal with key 
>>> of type
>> [org.apache.xmlbeans.XmlBeans$1] (value 
>> [org.apache.xmlbeans.XmlBeans$1@561915df ]) and a value of type 
>> [java.lang.ref.SoftReference] (value 
>> [java.lang.ref.SoftReference@1a4d1557])
>> but failed to remove it when the web application was stopped. Threads 
>> are going to be renewed over time to try and avoid a probable memory
leak.
>>>
>>>
>>>
>>> Can anyone shed any light on this?
>>>
>>>
>>>
>>> Best
>>>
>>>
>>>
>>> James
>>>
>>> Infoshare Ltd
>>> Millennium House
>>> 21 Eden Street
>>> Kingston upon Thames
>>> Surrey
>>> KT1 1BL
>>> United Kingdom
>>>
>>> Phone: +44 (0) 20 8541 0111
>>> Support:  +44 (0) 20 8481 4760
>>> Web:  http://www.infoshare-is.com/
>>> E-mail:  info@infoshare-is.com
>>>
>>> Infoshare Ltd is registered in England and Wales.
>>> Registered Office as above.
>>> Registered Number 2877612
>>> VAT Number GB 678 1443 10
>>>
>>> The content of this e-mail (and any attachment to it) is 
>>> confidential. Any
>> views or opinions do not represent the views or opinions of Infoshare
Ltd.
>> If you have received this e-mail in error please notify the sender 
>> and delete it. You may not use, copy or disclose the information in any
way.
>>>
>>> Infoshare Ltd monitors incoming and outgoing e-mails.
>>>
>>> Please consider the environment. Do you really need to print this email?
>>
>>
>>
>>
>> --
>> Atte.
>> Moisés Alberto Lindo Gutarra
>> Asesor - Desarrollador Java / Open Source Linux Registered User 
>> #431131 - http://counter.li.org/
>> Cel: (511) 995081720 - Rpm: *548913
>> EMail: mlindo@gmail.com
>> MSN: mlindo@tumisolutions.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
>>
>>
>> Infoshare Ltd
>> Millennium House
>> 21 Eden Street
>> Kingston upon Thames
>> Surrey
>> KT1 1BL
>> United Kingdom
>>
>> Phone:          + 44 (0) 20 8541 0111
>> Support:        + 44 (0) 20 8481 4760
>> Web:            www.infoshare-is.com
>> E-mail:         info@infoshare-is.com
>>
>> Infoshare Ltd is registered in England and Wales.
>> Registered Office as above.
>> Registered Number 2877612
>> VAT Number GB 678 1443 10
>>
>> The content of this e-mail (and any attachment to it) is confidential.
Any views or opinions do not represent the views or opinions of Infoshare
Ltd.
>> If you have received this e-mail in error please notify the sender and
delete it. You may not use, copy or disclose the information in any way.
>>
>> Infoshare Ltd monitors incoming and outgoing e-mails.
>>
>> Please consider the environment. Do you really need to print this email?
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
> 
> 
> 


-- 

[key:62590808]


Infoshare Ltd
Millennium House
21 Eden Street
Kingston upon Thames
Surrey
KT1 1BL
United Kingdom

Phone: 		+ 44 (0) 20 8541 0111
Support:	+ 44 (0) 20 8481 4760
Web:		www.infoshare-is.com
E-mail:		info@infoshare-is.com

Infoshare Ltd is registered in England and Wales.
Registered Office as above.
Registered Number 2877612
VAT Number GB 678 1443 10

The content of this e-mail (and any attachment to it) is confidential. Any views or opinions
do not represent the views or opinions of Infoshare Ltd.
If you have received this e-mail in error please notify the sender and delete it. You may
not use, copy or disclose the information in any way. 

Infoshare Ltd monitors incoming and outgoing e-mails.

Please consider the environment. Do you really need to print this email?



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Mime
View raw message