aspose file tools*
The moose likes Tomcat and the fly likes Cannot get a connection, pool error Timeout waiting for idle object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Cannot get a connection, pool error Timeout waiting for idle object" Watch "Cannot get a connection, pool error Timeout waiting for idle object" New topic
Author

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

Elan Ram
Ranch Hand

Joined: Dec 14, 2006
Posts: 40
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?


Thanks and regards,
Elan
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

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 ?


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Elan Ram
Ranch Hand

Joined: Dec 14, 2006
Posts: 40
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

Joined: Feb 19, 2008
Posts: 2902
    
    1

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

Joined: Feb 19, 2008
Posts: 2902
    
    1

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

Joined: Dec 14, 2006
Posts: 40
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

Joined: Feb 19, 2008
Posts: 2902
    
    1

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.
 
Don't get me started about those stupid light bulbs.
 
subject: Cannot get a connection, pool error Timeout waiting for idle object
 
Similar Threads
Sharing a Spring BeanFactory across two servlet contexts
Can Not Keep Tomcat Up and running ~30 mins
Connetion pool time exhausted for idle object on linux tomcat
Connection Problem in Linux Server
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted