troubleshooting Question

Connection pool error - cannot get connection

Avatar of gublooo
gubloooFlag for India asked on
MySQL ServerJava App ServersJava EE
10 Comments1 Solution16944 ViewsLast Modified:
Dear Experts,

I run an ecommerce website and I'm doing load testing on the site to see what load it can handle. When I run the case 1000 users in 1 hour, the site breaks down and I start getting the error messages below in the log files.

What settings do I need to change to take care of this. This is the current setup for my DB: I'm using tomcats DBCP connection pool

Thanks

<Context reloadable="true">
  <Resource name="jdbc/discountweb" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="16"
    maxWait="1000" username="xxxxx" password="xxxxx" driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost/xxxx?autoreconnect=true" />
</Context>



*****************************************************************************************
This is the error message:

ERROR 2009-01-15 15:35:56,201 [QuartzScheduler_DS-govasool-labs.com1231967805483_ClusterManager] - ClusterManager: Error managing cluster: Failed to obtain DB connection from data source 'springNonTxDataSource.DS': org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object
org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource.DS': org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object [See nested exception: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object]
    at org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:1454)
    at org.quartz.impl.jdbcjobstore.JobStoreCMT.doCheckin(JobStoreCMT.java:1374)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:2378)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:2409)
* Nested Exception (Underlying Cause) ---------------
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object
    at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at org.springframework.jdbc.datasource.UserCredentialsDataSourceAdapter.doGetConnection(UserCredentialsDataSourceAdapter.java:161)
    at org.springframework.jdbc.datasource.IsolationLevelDataSourceAdapter.doGetConnection(IsolationLevelDataSourceAdapter.java:127)
    at org.springframework.jdbc.datasource.UserCredentialsDataSourceAdapter.getConnection(UserCredentialsDataSourceAdapter.java:132)
    at org.springframework.scheduling.quartz.LocalDataSourceJobStore$2.getConnection(LocalDataSourceJobStore.java:125)
    at org.quartz.utils.DBConnectionManager.getConnection(DBConnectionManager.java:111)
    at org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:1431)
    at org.quartz.impl.jdbcjobstore.JobStoreCMT.doCheckin(JobStoreCMT.java:1374)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:2378)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:2409)
Caused by: java.util.NoSuchElementException: Timeout waiting for idle object
    at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:958)
    at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
    ... 10 more
ASKER CERTIFIED SOLUTION
crossdev

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros