[opencms-dev] Timeout waiting for idle object

Achim Westermann achim.westermann at questico.de
Tue Mar 9 14:43:52 CET 2010


Hi Paul-Inge,

you should edit your opencms.properties and set

db.pool.default.whenExhaustedAction=grow

Also you should turn on eviction by commenting in the test query.

HTH,

Achim


Paul-Inge Flakstad wrote:
> Hi all
>  
> One of our production system routinely crashes every 10 days or so. The 
> error seems to be related to OpenCms' communication with MySQL, one 
> exception is "SQLNestedException: Cannot get a connection, pool error: 
> Timeout waiting for idle object" - see below for a full stack trace. I'm 
> not sure what action(s) to take in order to prevent this - I'm not even 
> sure if it's a bug or a config issue (?).
>  
> (I found a previous thread describing the same problem 
> [http://mail.opencms.org/pipermail/opencms-dev/2009q4/033319.html] 
> but whether the given fix could itself become a problem over time is a 
> question left unanswered.)
>  
> Any help will be appreciated.
>  
> Thanks,
> Paul
>  
> ---
> System info: OpenCms 7.5.1 release / Tomcat 5.5 with Apache 2.2 in front 
> / MySQL 5.0.77
>  
> Snippet from opencms.log:
>  
> 09 Mar 2010 12:22:04,074 ERROR [ina.core.ApplicationDispatcher: 711] 
> Servlet.service() for servlet jsp threw exception
> java.util.NoSuchElementException: Timeout waiting for idle object
>         at 
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:958)
>         at 
> org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:176)
>         at java.sql.DriverManager.getConnection(DriverManager.java:582)
>         at java.sql.DriverManager.getConnection(DriverManager.java:207)
>         at 
> org.opencms.db.CmsSqlManager.getConnectionByUrl(CmsSqlManager.java:104)
>         at 
> org.opencms.db.generic.CmsSqlManager.getConnection(CmsSqlManager.java:231)
>         at 
> org.opencms.db.generic.CmsVfsDriver.readResource(CmsVfsDriver.java:1931)
>         at 
> org.opencms.db.CmsDriverManager.readResource(CmsDriverManager.java:6462)
>         at 
> org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:5854)
>         at 
> org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:4033)
>         at org.opencms.file.CmsObject.readResource(CmsObject.java:3525)
>         at org.opencms.file.CmsObject.readResource(CmsObject.java:3492)
>         at 
> org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:157)
>         at 
> org.opencms.jsp.CmsJspTagInclude.includeActionWithCache(CmsJspTagInclude.java:364)
>         at 
> org.opencms.jsp.CmsJspTagInclude.includeTagAction(CmsJspTagInclude.java:241)
>         at 
> org.opencms.jsp.CmsJspTagInclude.includeTagAction(CmsJspTagInclude.java:166)
>         at 
> org.opencms.jsp.CmsJspActionElement.include(CmsJspActionElement.java:510)
>         at 
> org.opencms.jsp.CmsJspActionElement.include(CmsJspActionElement.java:534)
>         at 
> org.opencms.jsp.util.CmsJspStatusBean.includeTemplatePart(CmsJspStatusBean.java:335)
>         at 
> org.opencms.jsp.util.CmsJspStatusBean.includeTemplatePart(CmsJspStatusBean.java:312)
>         at 
> org.apache.jsp.WEB_002dINF.jsp.online.system.handler.handle404_html_jsp._jspService(handle404_html_jsp.java:54)
>         at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>         at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
>         at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:584)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497)
>         at 
> org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestDispatcher.java:194)
>         at 
> org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:169)
>         at org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:555)
>         at 
> org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRequestDispatcher.java:423)
>         at 
> org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:173)
>         at 
> org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJspLoader.java:829)
>         at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:512)
>         at 
> org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:1052)
>         at 
> org.opencms.main.OpenCmsServlet.openErrorHandler(OpenCmsServlet.java:320)
>         at org.opencms.main.OpenCmsServlet.handle(OpenCmsServlet.java:219)
>         at 
> org.opencms.main.OpenCmsServlet.invokeHandler(OpenCmsServlet.java:272)
>         at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:150)
>         at 
> org.opencms.main.OpenCmsServletErrorHandler.doGet(OpenCmsServletErrorHandler.java:82)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
>         at 
> org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:364)
>         at 
> org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:285)
>         at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>         at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>         at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>         at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
>         at 
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
>         at 
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
>         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
>         at 
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
>         at 
> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
>         at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>         at java.lang.Thread.run(Thread.java:619)
>  
> 09 Mar 2010 12:22:04,075 ERROR [ina.core.ApplicationDispatcher: 711] 
> Servlet.service() for servlet OpenCmsServletErrorHandler threw exception
> java.util.NoSuchElementException: Timeout waiting for idle object
>         at 
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:958)
>         at 
> org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:176)
>         at java.sql.DriverManager.getConnection(DriverManager.java:582)
>         at java.sql.DriverManager.getConnection(DriverManager.java:207)
>         at 
> org.opencms.db.CmsSqlManager.getConnectionByUrl(CmsSqlManager.java:104)
>         at 
> org.opencms.db.generic.CmsSqlManager.getConnection(CmsSqlManager.java:231)
>         at 
> org.opencms.db.generic.CmsVfsDriver.readResource(CmsVfsDriver.java:1931)
>         at 
> org.opencms.db.CmsDriverManager.readResource(CmsDriverManager.java:6462)
>         at 
> org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:5854)
>         at 
> org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:4033)
>  at org.opencms.file.CmsObject.readResource(CmsObject.java:3525)
>         at org.opencms.file.CmsObject.readResource(CmsObject.java:3492)
>         at 
> org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:157)
>         at 
> org.opencms.jsp.CmsJspTagInclude.includeActionWithCache(CmsJspTagInclude.java:364)
>         at 
> org.opencms.jsp.CmsJspTagInclude.includeTagAction(CmsJspTagInclude.java:241)
>         at 
> org.opencms.jsp.CmsJspTagInclude.includeTagAction(CmsJspTagInclude.java:166)
>         at 
> org.opencms.jsp.CmsJspActionElement.include(CmsJspActionElement.java:510)
>         at 
> org.opencms.jsp.CmsJspActionElement.include(CmsJspActionElement.java:534)
>         at 
> org.opencms.jsp.util.CmsJspStatusBean.includeTemplatePart(CmsJspStatusBean.java:335)
>         at 
> org.opencms.jsp.util.CmsJspStatusBean.includeTemplatePart(CmsJspStatusBean.java:312)
>         at 
> org.apache.jsp.WEB_002dINF.jsp.online.system.handler.handle404_html_jsp._jspService(handle404_html_jsp.java:54)
>         at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>         at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
>         at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:584)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497)
>         at 
> org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestDispatcher.java:194)
>         at 
> org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:169)
>         at org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:555)
>         at 
> org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRequestDispatcher.java:423)
>         at 
> org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:173)
>         at 
> org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJspLoader.java:829)
>         at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:512)
>         at 
> org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:1052)
>         at 
> org.opencms.main.OpenCmsServlet.openErrorHandler(OpenCmsServlet.java:320)
>         at org.opencms.main.OpenCmsServlet.handle(OpenCmsServlet.java:219)
>         at 
> org.opencms.main.OpenCmsServlet.invokeHandler(OpenCmsServlet.java:272)
>         at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:150)
>         at 
> org.opencms.main.OpenCmsServletErrorHandler.doGet(OpenCmsServletErrorHandler.java:82)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
>         at 
> org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:364)
>         at 
> org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:285)
>         at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>         at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>         at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>         at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
>         at 
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
>         at 
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
>         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
>         at 
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
>         at 
> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
>         at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>         at java.lang.Thread.run(Thread.java:619)
>  
> 09 Mar 2010 12:25:32,734 ERROR [rg.opencms.jsp.CmsJspLoginBean: 287] 
> Failed login of user "OU_OUNAME/username": A database error occurred 
> reading the user data. Request from IP ***.***.***.*** using uri 
> "/system/login/index.html".
> org.opencms.db.CmsDbSqlException: An SQL error occurred when executing 
> the following query: .
>         at 
> org.opencms.db.generic.CmsUserDriver.readUserInfos(CmsUserDriver.java:1485)
>         at 
> org.opencms.db.generic.CmsUserDriver.internalCreateUser(CmsUserDriver.java:2323)
>         at 
> org.opencms.db.generic.CmsUserDriver.readUser(CmsUserDriver.java:1409)
>         at 
> org.opencms.db.CmsDriverManager.loginUser(CmsDriverManager.java:4700)
>         at 
> org.opencms.db.CmsDriverManager.loginUser(CmsDriverManager.java:4733)
>         at 
> org.opencms.db.CmsSecurityManager.loginUser(CmsSecurityManager.java:2883)
>         at org.opencms.file.CmsObject.loginUser(CmsObject.java:2263)
>         at org.opencms.jsp.CmsJspLoginBean.login(CmsJspLoginBean.java:189)
>         at org.opencms.jsp.CmsJspLoginBean.login(CmsJspLoginBean.java:169)
>         at org.opencms.workplace.CmsLogin.displayDialog(CmsLogin.java:293)
>         at 
> org.apache.jsp.WEB_002dINF.jsp.online.system.login.index_html_jsp._jspService(index_html_jsp.java:48)
>         at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>         at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
>         at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:584)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497)
>         at 
> org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestDispatcher.java:194)
>         at 
> org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:169)
>         at org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:555)
>         at 
> org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRequestDispatcher.java:423)
>         at 
> org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:173)
>         at 
> org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJspLoader.java:829)
>         at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:512)
>         at 
> org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:1052)
>         at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1489)
>         at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:153)
>         at org.opencms.main.OpenCmsServlet.doPost(OpenCmsServlet.java:166)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>         at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>         at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
>         at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>         at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>         at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>         at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
>         at 
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
>         at 
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
>         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
>         at 
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
>         at 
> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
>         at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>         at java.lang.Thread.run(Thread.java:619)
> Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a 
> connection, pool error: Timeout waiting for idle object
>         at 
> org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:184)
>         at java.sql.DriverManager.getConnection(DriverManager.java:582)
>         at java.sql.DriverManager.getConnection(DriverManager.java:207)
>         at 
> org.opencms.db.CmsSqlManager.getConnectionByUrl(CmsSqlManager.java:104)
>         at 
> org.opencms.db.generic.CmsSqlManager.getConnection(CmsSqlManager.java:231)
>         at 
> org.opencms.db.generic.CmsUserDriver.readUserInfos(CmsUserDriver.java:1445)
>         ... 49 more
> Caused by: java.util.NoSuchElementException: Timeout waiting for idle object
>         at 
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:958)
>         at 
> org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:176)
>         ... 54 more
> 
> 
> ------------------------------------------------------------------------
> 
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev


-- 
Achim Westermann
Java Developer IT Online Content

TEL   +49 (0)30 22 44 55 - 419
FAX   +49 (0)30 22 44 55 - 111
MAIL  achim.westermann at questico.de
WEB  www.questico.de

Questico AG
Zimmerstraße 68
Eingang Markgrafenstraße 58
10117 Berlin

Eingetragen beim AG Berlin Charlottenburg
HRB Nr. 76491
Vorstand: Sylvius Bardt (Vors.), Tim Schiffers, Dr. Ulrich Kohl, Michael Knapstein
Aufsichtsratsvorsitzender: Michael Wölfle



More information about the opencms-dev mailing list