• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem with the connection pool  RSS feed

 
maheedar sand
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In our project we are using ConnectioPool (DBPool). It is causing CLOSE_WAIT state which we are unable to resolve.
I searched in internet and found out that the issue with the application itself. I have studied the dbpool in internet and found that when once we are done with our operations then we need to invoke "release" on connection pool object, which we are not doing. I'm not able to figure it out exactly where we need to invoke this. All the CLOSE_WAIT's are piled up and making the tomcat server to
stop abruptly. When once I restart the tomcat server it is working fine. Please help me...

Please go through with the below code and suggest necessary changes.

DatabaseClass.java


Thank You everyone in advance for the extended help in need.

Thanks and Regards,
G. Sathish Kumar
 
Vijitha Kumara
Bartender
Posts: 4002
42
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Didn't check the complete code here but some other suggestions.

You can check for interactive_timeout & wait_timeout global vars in MySQL to see whether they are set to small values, in which case might cause problems.

Also I assume you are properly closing the connection/statement etc... objects once done using them in your application code?
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
maheedar sand wrote:In our project we are using ConnectioPool (DBPool).

Which would appear to be proprietary software. Have you contacted the authors?

I've certainly never used it, but maybe someone who has can move your thread to a more appropriate forum, because I'm not sure that it falls under the heading of "Java in General".

I have studied the dbpool in internet and found that when once we are done with our operations then we need to invoke "release" on connection pool object, which we are not doing. I'm not able to figure it out exactly where we need to invoke this.

Me neither, but I did find this section, which would suggest that you need to close everything associated with a Connection in reverse order. No idea whether it's anything to do with your problem though.

You could also help us out by trimming down that code a bit. We're a forum, not a coding service, and 231 heavy-duty lines is quite a lot to expect volunteers to plough through.

Winston
 
maheedar sand
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


I have checked in mysql server. "interactive_timeout" and "wait_timeout" variables are set to default values i.e. 28800. Do you need me to increase the values.


Thanks and Regards,
G. Sathissh Kumar
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!