This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
It could be as simple as giving the server more memory, but you should use a memory profiling tool to see if you have a memory leak. If you do, then yes, you have big troubles. It's not impossible to diagnose and fix memory leakis, but sometimes there may be a bit of a trick to it. Profiling tools are a must-have though.
I Think the problem with Memory leaks in the Applications.... Web-Applications are very prone to Memory Leaks.... to fix these kind of problems u need to use profiling tools to find where the Memory leaks are occuring....
Finding a memory-leak in the application is not an easy task. little bit of patience is requires to see where went wrong.
There are somany tools in the market as both commercial and open source. 1)JProfiler 2)App-perfect 3)JProbe are commercial..
one temparory solutions is to increase the jvm size to specified extent through JAVA_OPTS -Xms100m -Xmx300m.
JProfiler is quite good,use it.. here are some good links related to Memory leaks and tools.
Originally posted by balakrishna billa: I Think the problem with Memory leaks in the Applications....
It is not possible for us to say whether or not there is a leak in the original poster's application. We don't have enough information and it usually does more harm than good to speculate in these cases. It could just be that the application requires more memory than the default heap size.
As David mentioned, a profiling tool will help you to find out quickly and reliably if you have a memory leak. A poor mans alternative would be to increase the heap size of the app server and watch it over time. If, when the memory consumption gets close to what's been allotted, garbage collection runs and brings it back down, then there is a good chance that the increase in heap size was all that was needed. If, on the other hand, it is a memory leak, increasing the heap size will only postpone the problem.
Thanks for your suggestions. I got the solution. The problem was in the code result set and prepared statements are not closed in the finally block. My company has not provided any profiling tool as such. So i went through the code manually and caught the problem.
Thanks to Dave/balakrishna/Ben Souther for their valualble suggestions