I use Netbeans 6 with its built-in profiler (all free) to track down memory usage issues, and other performance problems in Java apps in general and Tomcat in particular.
Hai Vu "Tom Price" <[EMAIL PROTECTED]> 27/03/2008 07:59 PM Please respond to "Tomcat Users List" <users@tomcat.apache.org> To "Tomcat Users List" <users@tomcat.apache.org> cc Subject RE: Memory leak in Tomcat 5.5.16 Christopher, Christopher Schultz wrote: > Have you been able to compare the numbers of those objects after, say, > 100 requests with the same object counts after, say, 10000 requests? It > /is/ possible that Tomcat is leaking memory per connection, but very > unlikely given that thousands of servers are humming along quite nicely > without such problems. Thanks for the suggestions. I have looked at the change in number of objects over time, and the only objects that appear to be leaked consistently are the following (the number is the increase in object count over a typical 10 minute period, with about 2000 requests): org.apache.tomcat.util.buf.ByteChunk 10437 org.apache.tomcat.util.buf.CharChunk 8946 org.apache.tomcat.util.buf.MessageBytes 7881 Other object types, including byte[] and char[], vary wildly in each 10 minute period, presumably depending on exactly what's going on at the time of the sample. I'm trying to find a tool that will show me which objects are holding onto references to these Tomcat objects, but haven't had much success so far - any suggestions gratefully received. > The only really good way to figure out what's happening is to instrument > your JVM and then test the hell out of it. Use JMeter to generate load > (serial or concurrent) and observe the heap, etc. You might even try to > disable some of the SOAP methods you are testing to see if this leak > only occurs with certain calls, or combinations of calls. That's what I'm doing now... I will also try Filip's suggestion of disabling string caching. Sadly jmap doesn't work on this system because the heap is large and jmap always crashes with an OutOfMemoryError due to the 2GB heap limit in the JVM. I haven't used JMeter before but will look into it. Thanks, Tom. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]