[opencms-dev] Is there a way to tell OpenCms not hang?
Kim, Allan
jak009 at ucsd.edu
Fri Jul 4 00:50:20 CEST 2008
Try switching to com.mysql.jdbc.Driver instead of the old mm.mysql driver.
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of simone.bortolaso at tiscali.it
Sent: Thursday, July 03, 2008 2:52 PM
To: opencms-dev at opencms.org
Subject: [opencms-dev] Is there a way to tell OpenCms not hang?
Hi all,
to better explain the concept, the configuration of my server is as follows
The virtual machine (JDK1.5) , Tomcat (5.5.25) , Apache 2.2.8 , Mysql5.0.47, RHL 5.0, Opencms 7.0.4 and
in my project some jsp connect to an external database, which connector is configured in my path /var/tomcat/conf/contex.xml.
The problem stems from the fact that OpenCms hangs if the connector context.xml, using my jsp, has problems like database shutdown or
unreachable on the network.
Is there a way to tell OpenCms not hang?
I configure the connector as follows, but the value maxWait 10 seconds is not respected:
<Resource name="jdbc/newsletter"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
type="javax.sql.DataSource"
driverClassName="org.gjt.mm.mysql.Driver"
url="jdbc:mysql://192.168.11.11:3306/newsletter"
auth="Container"
scope="Shareable"
username="root"
password="root"
maxActive="50"
maxIdle="10"
maxWait="10000"
removeAbandoned="true"
removeAbandonedTimeout="60"
logAbandoned="true"
/>
The number of threads increase up to the value maxThread configured in /var/tomcat/conf/server.xml
and than all OpenCms threads waiting for monitor entry.
"TP-Processor460" daemon prio=1 tid=0x6f8d9838 nid=0x634e waiting for monitor entry [0x6c7fe000..0x6c7ff130]
at org.opencms.db.CmsSqlManager.getConnectionByUrl(CmsSqlManager.java: 104) - waiting to lock <0x91a33c80> (a org.opencms.db.mysql. CmsSqlManager)
at org.opencms.db.generic.CmsSqlManager.getConnection(CmsSqlManager. java:231)
at org.opencms.db.generic.CmsVfsDriver.readResource(CmsVfsDriver.java: 1905)
at org.opencms.db.CmsDriverManager.readResource(CmsDriverManager.java: 6387)
at org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager. java:5798)
at org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager. java:3987)
at org.opencms.file.CmsObject.readResource(CmsObject.java:3470)
at org.opencms.file.CmsObject.readResource(CmsObject.java:3437)
at org.opencms.i18n.CmsDefaultLocaleHandler.getI18nInfo (CmsDefaultLocaleHandler.java:103)
at org.opencms.i18n.CmsLocaleManager.getI18nInfo(CmsLocaleManager. java:767)
at org.opencms.main.OpenCmsCore.initCmsObject(OpenCmsCore.java:2015)
at org.opencms.main.OpenCmsCore.updateContext(OpenCmsCore.java:1657)
at org.opencms.main.A_CmsAuthorizationHandler.registerSession (A_CmsAuthorizationHandler.java:82)
at org.opencms.security.CmsDefaultAuthorizationHandler.initCmsObject (CmsDefaultAuthorizationHandler.java:73)
at org.opencms.main.OpenCmsCore.initCmsObject(OpenCmsCore.java:2071)
at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1489)
at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:152)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
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:174)
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:595)
thanks in advance,
Simone
_________________________________________________________________
Tiscali Family: Adsl e Telefono senza limiti e senza scatto alla risposta. PER TE CON LO SCONTO DEL 25% FINO AL 2010. In più il software parental control Magic Desktop Basic è GRATIS! Attiva entro il 03/07/08. http://abbonati.tiscali.it/promo/tuttoincluso/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20080703/2081ee25/attachment.htm>
More information about the opencms-dev
mailing list