This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am having a spring hibernate webapplication which runs on jboss server. I have noticed JVM Free memory decreasing drastically in a weeks time since i start the server .
and jvm thread count goes up. I have run heap dump on eclipse memory analyzer and it list -org.hibernate.impl.SessionFactoryImpl as prime suspect . My application connect to three different database and hence having three sessionFactories. I have disabled the cache still the memory analyzer shows object retained by org.hibernate.engine.query.QueryPlanCache . Is there any way to disable this ?
I feel that probability of this being a issue with Hibernate is on the lower side.
It is also possible that rather than being a memory leak the issue be caused due to large amount of data being loaded by the application. In this case the objects will show up as being referenced by Session Factory even though the application is loading the data.
Have you enabled GC logging? At times the GC logs provide useful information. Are you also taking thread dumps?
I would suggest that you look at the type of entities being held in memory in the heap dump. Then try to co-relate it with the thread dump that you have taken, i:e is any of the threads showing up in thread dump loading this data?