You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ed Hamilton <ed...@proleon.com> on 2005/06/10 01:57:55 UTC

Help with memory leak using Tomcat

I posted something similar to the Tomcat bug list and was asked to move it
here.  My first mailing to this list, so please correct any gaffes on my
part...

I'm running Tomcat 5.5.9; isapi redirector 1.2.13; J2SE 1.5.0.03; JDBC
3.1.8a;  to support 2 very low volume websites.  I have some kind of memory
leak which triples tomcat's memory usage over about 4-5 days.

I downloaded and installed AppPerfect profiler, and it shows a steady,
consistent increase in objects and a corresponding decrease in the heap
size.  Even with my webserver shutdown and no Tomcat usage, this leak is
persistent. The memory leak checker portion of AppPerfect reports multiple
memory leaks (even with the web server shutdown as I mentioned.)

Can anybody help me figure out how to find out where this is coming from?

Best regards,
Ed Hamilton


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


Re: Help with memory leak using Tomcat

Posted by Sergey Pariev <eg...@tnet.dp.ua>.
Hi.
There was a discussion on this topic on Hibernate forum:
http://forum.hibernate.org/viewtopic.php?t=935948&postdays=0&postorder=asc&start=0
If you find how to solve it, please let us know - I'm currently having 
the same problem :).

Regards, Sergey.

sudip shrestha wrote:

>I have experienced similar kind of memory leak, but that was while
>reloading the context. There was a steady increase in the memory usage
>after each autoReload of my struts 1.2.7-hibernate 2.1.8 powered
>webApp in Tomcat 5.5.7/JDK 1.5/Fedora Core 2.
>At the beginning: the process memory used by tomcat was 6.6%, then
>after each reload it went on slight increase such as: 7.8%, 8.3%,
>8.8%, 9.1%, 10.1%, 10.7%....Then I shutdown the tomcat server and
>restarted the server, I saw the memory usage as 6.4%, then on the next
>reload the usage was 7.9%.....
>Meanwhile, the Java memory ( Runtime.getRuntime().totalMemory() –     
>Runtime.getRuntime().freeMemory() ) seem to stay pretty
>stabilized....So, basically only process memory is increasing...which
>tells me that there is a leak in native memory.
>I saw similar threads like this when somebody had memory leaks with
>application reload/startup/shutdown with Tomcat Manager webapp...
>I am also looking for a good direction to move ahead.
>
>On 6/10/05, Mark Thomas <ma...@apache.org> wrote:
>  
>
>>Does your profiling tool tell you the classes of the objects being
>>created? Can you take a snapshot at two points in time, compare them and
>>see what is  different? If we know the class of the objects being
>>created, it gives us a pretty good pointer as to where to start looking.
>>Without this information, it is needle in haystack time.
>>
>>If your profiler doesn't do this, you probably need to get a new profiler.
>>
>>Mark
>>
>>Ed Hamilton wrote:
>>    
>>
>>>I posted something similar to the Tomcat bug list and was asked to move it
>>>here.  My first mailing to this list, so please correct any gaffes on my
>>>part...
>>>
>>>I'm running Tomcat 5.5.9; isapi redirector 1.2.13; J2SE 1.5.0.03; JDBC
>>>3.1.8a;  to support 2 very low volume websites.  I have some kind of memory
>>>leak which triples tomcat's memory usage over about 4-5 days.
>>>
>>>I downloaded and installed AppPerfect profiler, and it shows a steady,
>>>consistent increase in objects and a corresponding decrease in the heap
>>>size.  Even with my webserver shutdown and no Tomcat usage, this leak is
>>>persistent. The memory leak checker portion of AppPerfect reports multiple
>>>memory leaks (even with the web server shutdown as I mentioned.)
>>>
>>>Can anybody help me figure out how to find out where this is coming from?
>>>
>>>Best regards,
>>>Ed Hamilton
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>    
>>


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


Re: Help with memory leak using Tomcat

Posted by sudip shrestha <su...@gmail.com>.
I have experienced similar kind of memory leak, but that was while
reloading the context. There was a steady increase in the memory usage
after each autoReload of my struts 1.2.7-hibernate 2.1.8 powered
webApp in Tomcat 5.5.7/JDK 1.5/Fedora Core 2.
At the beginning: the process memory used by tomcat was 6.6%, then
after each reload it went on slight increase such as: 7.8%, 8.3%,
8.8%, 9.1%, 10.1%, 10.7%....Then I shutdown the tomcat server and
restarted the server, I saw the memory usage as 6.4%, then on the next
reload the usage was 7.9%.....
Meanwhile, the Java memory ( Runtime.getRuntime().totalMemory() –     
Runtime.getRuntime().freeMemory() ) seem to stay pretty
stabilized....So, basically only process memory is increasing...which
tells me that there is a leak in native memory.
I saw similar threads like this when somebody had memory leaks with
application reload/startup/shutdown with Tomcat Manager webapp...
I am also looking for a good direction to move ahead.

On 6/10/05, Mark Thomas <ma...@apache.org> wrote:
> Does your profiling tool tell you the classes of the objects being
> created? Can you take a snapshot at two points in time, compare them and
> see what is  different? If we know the class of the objects being
> created, it gives us a pretty good pointer as to where to start looking.
> Without this information, it is needle in haystack time.
> 
> If your profiler doesn't do this, you probably need to get a new profiler.
> 
> Mark
> 
> Ed Hamilton wrote:
> > I posted something similar to the Tomcat bug list and was asked to move it
> > here.  My first mailing to this list, so please correct any gaffes on my
> > part...
> >
> > I'm running Tomcat 5.5.9; isapi redirector 1.2.13; J2SE 1.5.0.03; JDBC
> > 3.1.8a;  to support 2 very low volume websites.  I have some kind of memory
> > leak which triples tomcat's memory usage over about 4-5 days.
> >
> > I downloaded and installed AppPerfect profiler, and it shows a steady,
> > consistent increase in objects and a corresponding decrease in the heap
> > size.  Even with my webserver shutdown and no Tomcat usage, this leak is
> > persistent. The memory leak checker portion of AppPerfect reports multiple
> > memory leaks (even with the web server shutdown as I mentioned.)
> >
> > Can anybody help me figure out how to find out where this is coming from?
> >
> > Best regards,
> > Ed Hamilton
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
>

Re: Help with memory leak using Tomcat

Posted by Mark Thomas <ma...@apache.org>.
Does your profiling tool tell you the classes of the objects being 
created? Can you take a snapshot at two points in time, compare them and 
see what is  different? If we know the class of the objects being 
created, it gives us a pretty good pointer as to where to start looking. 
Without this information, it is needle in haystack time.

If your profiler doesn't do this, you probably need to get a new profiler.

Mark

Ed Hamilton wrote:
> I posted something similar to the Tomcat bug list and was asked to move it
> here.  My first mailing to this list, so please correct any gaffes on my
> part...
> 
> I'm running Tomcat 5.5.9; isapi redirector 1.2.13; J2SE 1.5.0.03; JDBC
> 3.1.8a;  to support 2 very low volume websites.  I have some kind of memory
> leak which triples tomcat's memory usage over about 4-5 days.
> 
> I downloaded and installed AppPerfect profiler, and it shows a steady,
> consistent increase in objects and a corresponding decrease in the heap
> size.  Even with my webserver shutdown and no Tomcat usage, this leak is
> persistent. The memory leak checker portion of AppPerfect reports multiple
> memory leaks (even with the web server shutdown as I mentioned.)
> 
> Can anybody help me figure out how to find out where this is coming from?
> 
> Best regards,
> Ed Hamilton
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 


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