FYI
you'll need to run JDK 6 for jmap

Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


> Date: Fri, 29 Aug 2008 09:44:41 -0700
> From: [EMAIL PROTECTED]
> To: users@tomcat.apache.org
> Subject: Re: Servlet Memory Leak
> 
> >
> > I have a fairly small memory leak in a servlet (Tomcat 6.0) running on a
> > Windows 2003 server. I have been looking into memory profiling to help me
> > find the leak but nothing seems to be or do what I need. Simply put I want a
> > list of all of the objects/primitives (and if possible their values) that
> > are in memory. It would be really nice if I didn't have to bring Tomcat down
> > at all to do this analysis as the servlet is running in a production
> > environment. Does anyone know of a decent free tool that does such a thing?
> > If not, what would be a good route to take to find this leak?
> >
> > Thanks a ton.
> >   
> I just finished debugging a major memory leak in my servlet application. 
> Try running the tool "jmap" that comes with java. It works great with 
> Tomcat - just find the PID of the Tomcat (java) instance and run it on that.
> 
> For example, fire up Windows Task Manager, go to Applications and find 
> Tomcat. Right-click and choose "go to process". This will move you to 
> the Process pane highlighting the Tomcat (java) process ID.
> 
> Now open a command (console) window and (assuming you have Java paths 
> set correctly), type:
> 
> jmap -histo PID >output.txt
> 
> (or >> output.txt - although I used sequentially numbered output files)
> 
> This will capture the stack info into a file for analysis. The PID is 
> the process ID you noted from the Task Manager. If you run this just 
> after you start Tomcat, then a few times after doing the things that you 
> suspect trigger the memory leak, you should see objects in the map that 
> you can identify as not getting released and thus zero in on the leak.
> 
> Cheers,
> 
> -Richard
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

_________________________________________________________________
Be the filmmaker you always wanted to be—learn how to burn a DVD with Windows®.
http://clk.atdmt.com/MRT/go/108588797/direct/01/

Reply via email to