[opencms-dev] Problems with log4j for debugging Database Problems

Mario Jäger m.jaeger at alkacon.com
Thu Mar 4 09:49:13 CET 2010


Hi Patrick,

To prevent the pool error, please change in the opencms.properties file the line in section 
#action to take when the pool is exhausted {grow|block|fail}

from:
db.pool.default.whenExhaustedAction=block

to:
db.pool.default.whenExhaustedAction=grow


To debug org.opencms.db you have to add following line in log4j.properties in section 
# Set levels for all default channels available in OpenCms:
log4j.logger.org.opencms.db=INFO


In your mail is to see that many lines in your log4j.properties file are uncomment. Is that 
really so?

-- 
Kind Regards,
Mario.
 
-------------------
Mario Jäger
 
Alkacon Software GmbH  - The OpenCms Experts                    
http://www.alkacon.com - http://www.opencms.org


Patrick Weimer schrieb:
> Hello!
>
> acutally we've got some stability problems with our OpenCMS 7.0.3 in a
> WebSphere Application Server 6.1.0.9 on Windows 2003 enviroment.
>
> The stability problem is determined to come from:
> system.out (WebSphere Log):
> ...
> [3/3/10 12:53:34:002 CET] 00000907 CmsDriverMana W
> org.opencms.db.CmsDbSqlException <init> An SQL error occurred when
> executing the following query:
> ...
> Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a
> connection, pool error: Timeout waiting for idle object
> ...
>
> So I suppose that we have to adjust the opencms.properties variable:
> db.pool.default.maxActive (And its friends)
>
> For getting more database "channels". But if I see the following messages
> before
> opencms with the Webspehere crashs:
>
> [3/3/10 4:29:48:705 CET] 000001ba CmsSessionMan I
> org.opencms.main.CmsSessionManager sessionDestroyed Session destroyed -
> Total: 63,853 Current: 312
> [3/3/10 4:29:48:721 CET] 000001ba CmsSessionMan I
> org.opencms.main.CmsSessionManager sessionDestroyed Session destroyed -
> Total: 63,853 Current: 313
> [3/3/10 4:29:48:721 CET] 000001ba CmsSessionMan I
> org.opencms.main.CmsSessionManager sessionDestroyed Session destroyed -
> Total: 63,853 Current: 314
>
> I ask myself: What dose this mean? I can't belive that there are more denn
> 300 parallel sessions
> on that website? So I want to debug the problem (or maybe no problem) and
> get a new one.
>
> OpenCMS don't write anymore logs. Our log4j.properties:
>
> #opencms.set.logfile=true
> #opencms.logfile=opencms.log
> #
> #log4j.rootLogger=\
> #     DEBUG,\
> #     OC
> #
> #log4j.appender.CONSOLE=${opencms.logfile}
> #
> #log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
> #log4j.appender.CONSOLE.layout.ConversionPattern=%5p [%15.15C:%4L] %m%n
> #
> #log4j.logger.com.opencms=INFO
> #log4j.logger.org.opencms=INFO
> #log4j.logger.org.opencms.init=INFO
> #log4j.logger.org.opencms.monitor=INFO
> #log4j.logger.org.opencms.scheduler=INFO
> #log4j.logger.org.opencms.search=INFO
> #log4j.logger.org.opencms.staticexport=INFO
> #log4j.logger.org.opencms.jsp.CmsJspLoginBean=INFO
> #log4j.logger.org.opencms.db.mysql3.CmsProjectDriver=INFO
> #log4j.logger.org.opencms.db.mysql.CmsProjectDriver=INFO
> #log4j.logger.org.opencms.db.oracle8.CmsProjectDriver=INFO
> #log4j.logger.org.opencms.db.oracle.CmsProjectDriver=INFO
> #log4j.logger.org.opencms.workplace.tools=WARN
> #
> #log4j.appender.OC=org.apache.log4j.RollingFileAppender
> #
> #log4j.appender.OC.File=${opencms.logfile}
> #
> #log4j.appender.OC.MaxFileSize=10mb
> #
> #log4j.appender.OC.MaxBackupIndex=50#
> #
> #log4j.appender.OC.layout=org.apache.log4j.PatternLayout
> #log4j.appender.OC.layout.ConversionPattern=%d{DATE} %5p [%30.30C:%4L] %m%n
>
> Maybe someone can help me to enable the logging of OpenCMS? If it is
> possible
> I want to debug org.opencms.db and org.apache.commons.dbcp for getting more
> informations about what happens while the crash.
>
>
>
> Mit freundlichen Grüßen
>
> Patrick Weimer
> --------------------------------------
> DREGER INFORMATION TECHNOLOGY
>
> DREGER Consulting GmbH & Co. KG
> Carl-Benz-Straße 35
> 60386 Frankfurt am Main
> Germany
>
> Phone : +49-69-90479-0
> Fax   : +49-69-90479-479
>
> E-Mail: patrick.weimer at dreger.de
> Web   : www.dreger.de
> --------------------------------------
> DREGER IT is Member of Grouplink
> www.grouplink.de
>
> --------------------------------------
> Sitz / Registergericht: Frankfurt am Main / Amtsgericht Frankfurt am Main
> Registernummer: HRA 42705
> Geschaeftsfuehrer: Jens Dreger
> USt.ID: DE244892265
> --------------------------------------
> Komplementaer-GmbH: DREGER Verwaltungs GmbH, Carl-Benz-Str. 35, 60386 Frankfurt am Main
> Sitz / Registergericht: Frankfurt am Main / Amtsgericht Frankfurt am Main
> Registernummer: HRB 73891
> Geschaeftsfuehrer: Jens Dreger
> --------------------------------------
>
> _______________________________________________
> 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
>   



More information about the opencms-dev mailing list