[opencms-dev] Problems with log4j for debugging DatabaseProblems

Patrick Weimer Patrick.Weimer at dreger.de
Thu Mar 4 10:32:50 CET 2010


Thanks a lot Mario!

I changed the parameter already yesterday and had no crash since then. I 
hope this fixed that problem. But back to the OpenCMS logging here my full 
log4j.properties:

opencms.set.logfile=true
opencms.logfile=opencms.log # This thell me that I can find the log under 
../log/opencms.log relativ to the log4j.properties, right?


# Per default we use WARN debug level and just one appender
log4j.rootLogger=\
        DEBUG,\
        OC

# ,CONSOLE

# Optional CONSOLE appender for logging on the system console (good for 
debugging during development)
log4j.appender.CONSOLE=${opencms.logfile}

# CONSOLE uses PatternLayout.
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%5p [%15.15C:%4L] %m%n

# Set levels for all default channels available in OpenCms
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=INFO
log4j.logger.org.opencms.workplace.tools=WARN

# This default appender configuration simply writes all OpenCms channels 
in one log file
# A OpenCms 'channel' directly translates into a 'logger' in the log4j 
lingo
log4j.appender.OC=org.apache.log4j.RollingFileAppender

# In a default Tomcat installation, this should place the log file in the 
Tomcat log directory
# Adjust this path in case you want to log in another directory
log4j.appender.OC.File=${opencms.logfile}

# Limit log size to 5mb, then rotate
log4j.appender.OC.MaxFileSize=10mb

# Keep 5 backup files
log4j.appender.OC.MaxBackupIndex=50

# This specifies the logfile layout
log4j.appender.OC.layout=org.apache.log4j.PatternLayout
log4j.appender.OC.layout.ConversionPattern=%d{DATE} %5p [%30.30C:%4L] %m%n



Maybe you can apprise the log entrys before the crash, too:
[3/3/10 4:29:48:721 CET] 000001ba CmsSessionMan I > 
org.opencms.main.CmsSessionManager sessionDestroyed Session destroyed -> 
Total: 63,853 Current: 313

Altogether 63,853 Sessions? 313 Current, parallel sessions? I can't belive 
it and suppose a problem in the development area, maybe not destructed 
objects or database connections. But acutally if got no founded argument 
for my theory. 

A fully OpenCMS documentation would be so wunderful! :)



Kind regards,

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




From:   Mario Jäger <m.jaeger at alkacon.com>
To:     The OpenCms mailing list <opencms-dev at opencms.org>
Date:   04.03.2010 09:50
Subject:        Re: [opencms-dev] Problems with log4j for debugging 
Database        Problems
Sent by:        opencms-dev-bounces at opencms.org



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
> 

_______________________________________________
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


--------------------------------------
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
--------------------------------------



More information about the opencms-dev mailing list