Scott McClanahan wrote:
> On Thu, 2008-03-13 at 12:02 -0400, Christopher Schultz wrote: > Caldarale, Charles R wrote: |> From: Scott McClanahan [mailto:[EMAIL PROTECTED] |> Subject: Re: Database connections grow after redeploy
| As far as the continuing data base connections, I can only speculate | that the prior instances of the webapp are still active, thereby | preventing cleanup of their resources.
> I agree. Scott: are you able to run your application through a tool that > allows you to observe the heap and object graphs?
> More likely is that one or more application-level objects has retained a > reference to a specific Connection object, which, of course, retains > references back to the connection pool that created it. I would check > any ServletContextListener classes you have, and then a generic search > for putting things into the ServletContext, since that is one of the > only places that applications typically store long-lived objects.
Do you have any suggestions for a profiling tool like you described? Preferably open source. Thanks.
Don't know about open source products, but I can vouch for YourKit Java Profiler. As far as I know, the main difference between YourKit and other profilers is that YourKit allows you to work through snapshots, whereas other profilers inject their probes into Java object creation methods. This means that more or less the only moment when YourKit has an effect on the performance of your application is when you take a memory snapshot. The other profilers I've seen attempt to trace each object allocation and deallocation in real time, which can be rather CPU consuming (especially if you're tracing a problem you cannot replicate in test environments). With YourKit, you take snapshots of the Java VM memory of your application, and compare them "off-line" (i.e. without needing any connection to the live application). -- ..Juha --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]