I am having more than 150 web applications in my tomcat web-apps directory can these be the one of the reason for increase in memory usage. i have installed tomcat as a service .
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, certainly. It has got to store the data somewhere. The memory is the best and fastest place to do that. Every created object instance/primitive value in Java code will be stored in memory.
If you have problems with it, then either increase the available memory for Tomcat or profile the webapp’s code and fix memory leaks/inefficiencies accordingly. You can also consider storing large and more permanent data in a relational database instead and load only the relevant data on a HTTP request basis.
Update: If you’re using Netbeans, you can use the builtin profiler to profile the webapp during development: http://profiler.netbeans.org. Further you can use VisualM to independently profile Tomcat. Here’s a nice blog which outlines how to do that. You can stresstest webapplications using JMeter.