This tutorial is going to show step by step guide on finding memory leaks in tomcat. Usually memory leaks happens when tomcat cannot free the memory used by the deployed webapp on undeploy.
Tools for ananlysing memory leaks
So the tools that we are going to use are quite easily available and most widely used.
- This comes with the java installation and is very handy.
- Eclipse MAT – plugin for eclipse
- Eclipse MAT plugin for eclipse: It is a very powerful tool to analyse memory issues.
Step By Step Guide
3. It will ask for the location of the file to which the heapdump should be stored. By default it stores the heapdump file in the tomcat/tmp folder.
4. You may need to change the permissions of the file for using it.
5. Then the next step would be to copy it to your desired location.
6. Go to eclipse and File > Open File and select the file
7. You will see dialog as below