Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot get a connection, pool error Timeout waiting for idle object

 
Elan Ram
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

We are facing issue with dbcp connection pooling in combination of tomcat sever and MySQL. The summary of stack trace is:



when i googled, Adding "autoReconnect=true" with jdbc URL will help to solve our problem, making this change also not solving our problem.
Is there any other area that i need to concentrate to resolve the ussue?
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you config your DBCP? Post the same xml here. You might set the maximum idle connection to very low count. Also are you releasing the connection properly ?
 
Elan Ram
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sagar,

Thanks for your reply. Already we have very less max idle time. Here is the config:



Is there any issue with the configuration?

 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The config file looks OK to me, though your are setting max active to 300, in practice its not required that high. Also

There is no point in passing the wrong command "autoConnect"

I strongly feel that, you are not properly closing the connection. Also as you are logging the abandoned connection, have you seen some exception for the same in log file?
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, have look at DBCP page for some extra config you want to try out:
http://commons.apache.org/dbcp/configuration.html
 
Elan Ram
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

We are using the internal framework for database operations so it might have tested properly. Even if it is poorly written we have configured as

so this will take care of it. At this moment I could not find the way to proceed.

Anyway thanks for your help.

 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Elan Ram wrote:We are using the internal framework for database operations

So you must specify that internal framework. Also ping the moderator to requesting to move this thread to JDBC section.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic