• Post Reply Bookmark Topic Watch Topic
  • New Topic

Increase heap object is it indicating memory leak ?  RSS feed

 
sukbir frwa
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Below is my 3 samples of different heap samples I have capture. I know my heap size is small but yet there is an increase in the number of objects and what does this represents and which worries me too. I have also put the leak suspect which mainly referring to the db where I am doing pooling. Is there any way to confirm that my pooling is not leaking too ?



2nd Sample




3rd Sample


 
Ivan Jozsef Balazs
Rancher
Posts: 999
5
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your connection objects seem to grow. Are the connections pooled?

Do you close the JDBC objects (for example CallableStatement) after their usage?

In a pooled environment closing a connection does not really close it but only marks it as free in the pool.
The other objects obtained through them are better closed themselves.
 
sukbir frwa
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ivan,
Yes I am using BoneCp for pooling. Yes finally I close the connection which I suppose goes back into the pool. Yes I close all my statement and also resultset. What worries be is that when I do the histogram check as below are the 3 samples. What I notice is for instance why the java.lang.string,char etc keep increasing. I am not sure is this a normal behavior? What is the difference between Object, Shallow Heap and Retained Heap how to analyse on this? Thank you.

Sample 1.




Sample 2




Sample 3





Ivan Jozsef Balazs wrote:Your connection objects seem to grow. Are the connections pooled?

Do you close the JDBC objects (for example CallableStatement) after their usage?

In a pooled environment closing a connection does not really close it but only marks it as free in the pool.
The other objects obtained through them are better closed themselves.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!