log4J2线程死锁

大唧八 2018-06-21 10:03:42

""ajp-bio-8010"-exec-5" daemon prio=6 tid=0x50d57c00 nid=0x355c waiting for monitor entry [0x53c6e000]
java.lang.Thread.State: BLOCKED (on object monitor)
at org.apache.logging.log4j.core.layout.TextEncoderHelper.copyDataToDestination(TextEncoderHelper.java:62)
- waiting to lock <0x1ad983f8> (a org.apache.logging.log4j.core.appender.OutputStreamManager)
at org.apache.logging.log4j.core.layout.TextEncoderHelper.encodeTextWithCopy(TextEncoderHelper.java:57)
at org.apache.logging.log4j.core.layout.StringBuilderEncoder.encodeWithThreadLocals(StringBuilderEncoder.java:70)
at org.apache.logging.log4j.core.layout.StringBuilderEncoder.encode(StringBuilderEncoder.java:63)
at org.apache.logging.log4j.core.layout.StringBuilderEncoder.encode(StringBuilderEncoder.java:32)
at org.apache.logging.log4j.core.layout.PatternLayout.encode(PatternLayout.java:219)
at org.apache.logging.log4j.core.layout.PatternLayout.encode(PatternLayout.java:57)
at org.apache.logging.log4j.core.appender.Abstra
...全文
232 点赞 收藏 4
写回复
4 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
两个猕猴桃 2018-06-21
先参考一下
https://stackoverflow.com/questions/42231440/log4j2-in-async-mode-still-blocks-on-java-util-concurrent-lock-under-heavy-load
回复
大唧八 2018-06-21
<RollingFile name="RollingFileWARN" fileName="${LOG_HOME}/debug.log" filePattern="${LOG_HOME}/$${date:yyyy-MM}/debug-%d{MM-dd-yyyy}-%i.log">
<ThresholdFilter level="WARN" onMatch="DENY" onMismatch="NEUTRAL"/>
<PatternLayout pattern="[%d{yyyy-MM-dd 'at' HH:mm:ss z}] [%-5p] %l - %m%n"/>
<SizeBasedTriggeringPolicy size="10MB"/>
</RollingFile>
</appenders>
<loggers>
<logger name="org.springframework" level="INFO"></logger>
<logger name="org.mybatis" level="INFO"></logger>
<root level="debug">
<appender-ref ref="Console"/>
<appender-ref ref="RollingFileWARN"/>
<appender-ref ref="RollingFileError"/>
</root>
</loggers>
</configuration>
回复
大唧八 2018-06-21
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="error">
<properties>
<property name="LOG_HOME">C://lht/manager</property>
</properties>
<appenders>
<Console name="Console" target="SYSTEM_OUT">
<ThresholdFilter level="DEBUG" onMatch="ACCEPT" onMismatch="DENY"/>
<PatternLayout pattern="[%d{HH:mm:ss.SSS}] [%-5p] %l - %m%n"/>
</Console>
<RollingFile name="RollingFileError" fileName="${LOG_HOME}/error.log" filePattern="${LOG_HOME}/$${date:yyyy-MM}/error-%d{MM-dd-yyyy}-%i.log">
<ThresholdFilter level="ERROR" onMatch="ACCEPT" onMismatch="DENY"/>
<PatternLayout pattern="[%d{yyyy-MM-dd 'at' HH:mm:ss z}] [%-5p] %l - %m%n"/>
<SizeBasedTriggeringPolicy size="5MB"/>
</RollingFile>
回复
大唧八 2018-06-21
看起来像写入日记出现了问题 但是日记写的进去啊
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2018-06-21 10:03
社区公告
暂无公告