logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: Re: Log4j2 RollingFileAppender deadlock issue
Date Thu, 02 Jul 2015 08:30:42 GMT
I would suggest NOT having both Log4j 1 and 2 on the class path at the same
time.

Instead, use the current version of Log4j 2 which is 2.3 and then use the
Log4j 2 1.2 compatibility module log4j-1.2-api.

Gary

On Thu, Jul 2, 2015 at 1:25 AM, bit1129@163.com <bit1129@163.com> wrote:

> Thanks Gary for the reply.
> The log related stuff is:
>
> <log4j2.version>2.0.2</log4j2.version>
> <log4j.version>1.2.16</log4j.version>
> <slf4j.version>1.7.7</slf4j.version>
>
> I have the thread dump in question ,and attach it in the attachment.
>
> Thanks you!
>
> ------------------------------
> bit1129@163.com
>
>
> *From:* Gary Gregory <garydgregory@gmail.com>
> *Date:* 2015-07-02 15:57
> *To:* Log4J Developers List <log4j-dev@logging.apache.org>
> *Subject:* Re: Log4j2 RollingFileAppender deadlock issue
> Hello,
>
> What version of Log4j are you using?
>
> Can you post the whole thread dump? You can capture it from VisualVM
> (jvisualvm) which ships with the JDK).
>
> Gary
>
> On Wed, Jul 1, 2015 at 10:36 PM, bit1129@163.com <bit1129@163.com> wrote:
>
>>
>> Hi,log4j developers,
>>
>> I am using log4j2 to do log. Recently I have encountered an
>> RollingFileAppender deadlock issue from time to time which happens around
>> 12:00 am ~03:00am.
>> When I dump the thread, there are lots of BLOCKED threads that waiting
>> for the lock 0x00000007a2cecaa0.
>>
>> Following is my log4j configuration in log4j2.xml:
>>
>> <RollingFile name="rolling" fileName="/data/logs/app/server.log"
>> filePattern="/data/logs/app/server.log.%d{yyyy-MM-dd}">
>> <PatternLayout pattern="[%-5level] [%d{yyyy-MM-dd HH:mm:ss}]
>> [%C{1}:%M:%L] %m%n" />
>> <Policies>
>> <TimeBasedTriggeringPolicy />
>> </Policies>
>> <DefaultRolloverStrategy max="30"/>
>> </RollingFile>
>>
>> Is this a bug or there is some misconfiguration in my configuration. Is
>> there a way that I can work around this? It happens in our production
>> environment.
>>
>>
>>
>>
>>
>> ------------------------------
>> bit1129@163.com
>>
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>  [image: 提示图标] 邮件带有附件预览链接,若您转发或回复此邮件时不希望对方预览附件,建议您手动删除链接。
> 共有 *1* 个附件
>  Catch(07-02-13-34-56).jpg(1M) 极速下载
> <http://preview.mail.163.com/xdownload?filename=Catch%2807-02-13-34-56%29.jpg&mid=xtbBEQQrgVD%2BdaYDbgAAsv&part=3&sign=455fc16698556220f55a79d0de214c25&time=1435824425&uid=bit1129%40163.com>
> 在线预览
> <http://preview.mail.163.com/preview?mid=xtbBEQQrgVD%2BdaYDbgAAsv&part=3&sign=455fc16698556220f55a79d0de214c25&time=1435824425&uid=bit1129%40163.com>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
View raw message