Topic: 求助,下面的错误是怎么会事?(dbcp: Cannot get a connection, pool exhausted)

  Print this page

1.求助,下面的错误是怎么会事?(dbcp: Cannot get a connection, pool exhausted) Copy to clipboard
Posted by: aquan
Posted on: 2006-09-29 08:48

ERROR:Wrong in get a Info from database
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:103)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
at gnnt.MEBS.info.Information.getInfoDetail(Information.java:1403)
at org.apache.jsp.web.shouye.systeminfo.news_005fdetail_jsp._jspService(news_005fdetail_jsp.java:629)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.util.NoSuchElementException: Timeout waiting for idle object
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:756)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
... 33 more

2.Re:求助,下面的错误是怎么会事? [Re: aquan] Copy to clipboard
Posted by: 九佰
Posted on: 2006-09-29 12:09

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:103)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
at gnnt.MEBS.info.Information.getInfoDetail(Information.java:1403)
at org.apache.jsp.web.shouye.systeminfo.news_005fdetail_jsp._jspService(news_005fdetail_jsp.java:629)

没得到数据库的连接,查看数据库的连接信息

3.Re:求助,下面的错误是怎么会事? [Re: 九佰] Copy to clipboard
Posted by: aquan
Posted on: 2006-09-29 12:58

但是网站运行正常的,只是偶尔会死掉

4.Re:求助,下面的错误是怎么会事? [Re: aquan] Copy to clipboard
Posted by: wes109
Posted on: 2006-09-29 14:23

aquan wrote:
但是网站运行正常的,只是偶尔会死掉


忙得时候就死掉了吧?

1、修改dbcp的配置,更改最大连接数
2、检查程序是否存在连接泄露

5.Re:求助,下面的错误是怎么会事?(dbcp: Cannot get a connection, pool exhausted) [Re: aquan] Copy to clipboard
Posted by: aquan
Posted on: 2006-09-30 07:56

这是服务器很慢很慢时的进程

20060919 8:20
System: hp01 Tue Sep 19 08:19:06 2006
Load averages: 6.70, 4.28, 3.77
125 processes: 115 sleeping, 9 running, 1 zombie
Cpu states:
CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 7.87 98.4% 0.0% 1.6% 0.0% 0.0% 0.0% 0.0% 0.0%
1 5.53 95.6% 0.0% 3.8% 0.6% 0.0% 0.0% 0.0% 0.0%
--- ---- - - - - - - - -----
avg 6.70 97.2% 0.0% 2.6% 0.2% 0.0% 0.0% 0.0% 0.0%

Memory: 1051980K (737680K) real, 3116436K (1870236K) virtual, 232612K free Page
# 1/11

CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
1 pts/ta 1076 root 152 20 855M 381M run 1:52 164.34 160.67 java
1 ? 1160 oracle 154 20 472M 2400K sleep 0:05 13.39 12.65 oracleye
0 ? 1154 oracle 154 20 472M 2528K sleep 0:02 4.01 3.79 oracleye
0 ? 1197 oracle 154 20 472M 2400K sleep 0:01 3.09 2.62 oracleye
0 ? 1193 oracle 154 20 472M 2144K sleep 0:00 0.97 0.83 oracleye
1 ? 1144 oracle 154 20 472M 2208K sleep 0:00 0.72 0.690.88 oracleye
0 ? 1150 oracle 154 20 472M 2224K sleep 0:00 0.72 0.680.74 oracleye
1 ? 2347 oracle 154 20 472M 580K sleep 41:33 0.64 0.64 oracleye
1 ? 1189 oracle 154 20 472M 2224K sleep 0:00 0.67 0.58 oracleye
1 ? 1110 oracle 154 20 472M 2160K sleep 0:00 0.55 0.53 oracleye
0 ? 2510 www 152 20 24704K 1724K run 1:25 0.51 0.51 httpd

6.Re:求助,下面的错误是怎么会事?(dbcp: Cannot get a connection, pool exhausted) [Re: aquan] Copy to clipboard
Posted by: 九佰
Posted on: 2006-09-30 14:43

第二种可能性比较大,看看Oralce连接的session有多少

7.Re:求助,下面的错误是怎么会事?(dbcp: Cannot get a connection, pool exhausted) [Re: aquan] Copy to clipboard
Posted by: aquan
Posted on: 2006-10-13 08:37

谢谢


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923