logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bit1129@163.com" <bit1...@163.com>
Subject Re: Re: Log4j2 RollingFileAppender deadlock issue
Date Thu, 02 Jul 2015 08:26:49 GMT
Sorry, looks that I forgot to attach the thread dump file. 

From: bit1129@163.com
Date: 2015-07-02 16:25
To: log4j-dev
Subject: Re: Re: Log4j2 RollingFileAppender deadlock issue
Thanks Gary for the reply.
The log related stuff is:


I have the thread dump in question ,and attach it in the attachment.

Thanks you!

From: Gary Gregory
Date: 2015-07-02 15:57
To: Log4J Developers List
Subject: Re: Log4j2 RollingFileAppender deadlock issue

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


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

<TimeBasedTriggeringPolicy /> 
<DefaultRolloverStrategy max="30"/> 

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.


E-Mail: garydgregory@gmail.com | ggregory@apache.org 
Java Persistence with Hibernate, Second Edition
JUnit in Action, Second Edition
Spring Batch in Action
Blog: http://garygregory.wordpress.com 
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
共有 1 个附件
Catch(07-02-13-34-56).jpg(1M) 极速下载 在线预览 
View raw message