Druid mysql 查询报错!

zhoujw8792 发布于 2013/08/26 18:56
阅读 803
收藏 0

@wenshao  最近Druid出现这个问题,在MySQL 下 ,现实环境的用户,数据库连接很小

2013-08-26 10:46:55.104:ERROR:org.hibernate.util.JDBCExceptionReporter:78:loopWaitCount 0, wait millis 60002, active 9

2013-08-26 10:46:56.789:ERROR:org.hibernate.util.JDBCExceptionReporter:78:loopWaitCount 0, wait millis 60012, active 9
2013-08-26 10:46:56.789:ERROR:org.hibernate.util.JDBCExceptionReporter:78:loopWaitCount 0, wait millis 60012, active 9
2013-08-26 10:47:08.739:ERROR:com.netposa.psap.dao.util.BDao:266:查询指定HQL异常,HQL:from Parameter where class_=? and Name=? and value=?
org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [null]; error code [0]; loopWaitCount 0, wait millis 60012, active 9; nested exception is com.alibaba.druid.pool.GetConnectionTimeoutException: loopWaitCount 0, wait millis 60012, active 9
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:124)
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322)
at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424)
at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:917)
at com.netposa.psap.dao.util.BDao.find(BDao.java:264)
at com.netposa.psap.dao.ParameterDAO.SearchOrCreateParameterByClassAndNameAndValue(ParameterDAO.java:410)
at com.netposa.psap.dao.ParameterDAO.getImServerParameter(ParameterDAO.java:376)
at com.netposa.psap.core.UserMngServiceProxy.getImServerParameter(UserMngServiceProxy.java:70)
at com.netposa.psap.core.UserMngServiceProxy$1.run(UserMngServiceProxy.java:94)
Caused by: com.alibaba.druid.pool.GetConnectionTimeoutException: loopWaitCount 0, wait millis 60012, active 9
at com.alibaba.druid.pool.DruidDataSource.pollLast(DruidDataSource.java:1375)
at com.alibaba.druid.pool.DruidDataSource.getConnectionInternal(DruidDataSource.java:1019)
at com.alibaba.druid.pool.DruidDataSource.getConnectionDirect(DruidDataSource.java:902)
at com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(FilterChainImpl.java:4534)
at com.alibaba.druid.filter.stat.StatFilter.dataSource_getConnection(StatFilter.java:661)
at com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(FilterChainImpl.java:4530)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:884)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:876)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:92)
at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:82)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
at org.hibernate.loader.Loader.doQuery(Loader.java:673)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:926)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419)
... 7 more
加载中
0
wenshao
wenshao
应该是sql执行慢,连接不够用
返回顶部
顶部