DB connection pool not connected, connection pool exhausted

Source: Internet
Author: User

The most recent period of time. This year began to put. I maintain the site has been error database connection is not found, link, connection pool exhaustion problem.
caused By:org.apache.commons.dbcp.SQLNestedException:Cannot get a connection, pool exhausted
2017-07-26 15:42:20,516 ERROR [STDERR] at Org.apache.commons.dbcp.PoolingDataSource.getConnection ( poolingdatasource.java:103)
2017-07-26 15:42:20,516 ERROR [STDERR] at Org.apache.commons.dbcp.BasicDataSource.getConnection ( basicdatasource.java:540)
2017-07-26 15:42:20,516 ERROR [STDERR] at Org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection ( localdatasourceconnectionprovider.java:81)
2017-07-26 15:42:20,516 ERROR [STDERR] at Org.hibernate.jdbc.ConnectionManager.openConnection ( connectionmanager.java:423)
2017-07-26 15:42:20,516 ERROR [STDERR] at Org.hibernate.jdbc.ConnectionManager.getConnection ( connectionmanager.java:144)
2017-07-26 15:42:20,516 ERROR [STDERR] at Org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement ( abstractbatcher.java:139)
2017-07-26 15:42:20,531 ERROR [STDERR] at org.hibernate.loader.Loader.prepareQueryStatement (loader.java:1547)
2017-07-26 15:42:20,531 ERROR [STDERR] at Org.hibernate.loader.Loader.doQuery (loader.java:673)
2017-07-26 15:42:20,531 ERROR [STDERR] at Org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections ( loader.java:236)
2017-07-26 15:42:20,531 ERROR [STDERR] at org.hibernate.loader.Loader.loadEntity (loader.java:1860)
2017-07-26 15:42:20,531 ERROR [STDERR] at Org.hibernate.loader.entity.AbstractEntityLoader.load ( ABSTRACTENTITYLOADER.JAVA:48)
2017-07-26 15:42:20,531 ERROR [STDERR] at Org.hibernate.loader.entity.AbstractEntityLoader.load ( ABSTRACTENTITYLOADER.JAVA:42)
2017-07-26 15:42:20,531 ERROR [STDERR] at Org.hibernate.persister.entity.AbstractEntityPersister.load ( abstractentitypersister.java:3044)
2017-07-26 15:42:20,531 ERROR [STDERR] at Org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource ( defaultloadeventlistener.java:395)
2017-07-26 15:42:20,531 ERROR [STDERR] at Org.hibernate.event.def.DefaultLoadEventListener.doLoad ( defaultloadeventlistener.java:375)
2017-07-26 15:42:20,531 ERROR [STDERR] at Org.hibernate.event.def.DefaultLoadEventListener.load ( defaultloadeventlistener.java:139)
2017-07-26 15:42:20,531 ERROR [STDERR] at Org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad ( defaultloadeventlistener.java:195)
2017-07-26 15:42:20,531 ERROR [STDERR] at Org.hibernate.event.def.DefaultLoadEventListener.onLoad ( defaultloadeventlistener.java:103)
2017-07-26 15:42:20,547 ERROR [STDERR] at Org.hibernate.impl.SessionImpl.fireLoad (sessionimpl.java:878)
2017-07-26 15:42:20,547 ERROR [STDERR] at Org.hibernate.impl.SessionImpl.get (sessionimpl.java:815)
2017-07-26 15:42:20,547 ERROR [STDERR] at Org.hibernate.impl.SessionImpl.get (sessionimpl.java:808)
2017-07-26 15:42:20,547 ERROR [STDERR] at Org.springframework.orm.hibernate3.hibernatetemplate$1.doinhibernate ( hibernatetemplate.java:477)
2017-07-26 15:42:20,547 ERROR [STDERR] at Org.springframework.orm.hibernate3.HibernateTemplate.execute ( hibernatetemplate.java:373)
2017-07-26 15:42:20,547 ERROR [STDERR] ... more
2017-07-26 15:42:20,547 ERROR [STDERR] caused by:java.util.NoSuchElementException:Timeout waiting for idle object
2017-07-26 15:42:20,547 ERROR [STDERR] at Org.apache.commons.pool.impl.GenericObjectPool.borrowObject ( genericobjectpool.java:756)
probably the log as shown above, is very depressed, called the test. Want the test to find the root cause. The result test can only reproduce the error: I felt a moment of loss of confidence.
after a good look at the log, look at the error method, found DAO in the acquisition connection unexpectedly is this.getsession. Baidu behind the next method. It comes with hibernate, but it won't be released. Comparing several methods of acquisition, I carefully replaced several classes. Fear is not the root of it.
after having the test tested again. found no error in connection pool exhaustion, and so on.
for the time being. Follow-up in the continuation of observation. Everyone has better ideas to put forward.

DB connection pool not connected, connection pool exhausted

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.