You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Remko Popma (JIRA)" <ji...@apache.org> on 2016/04/01 00:42:25 UTC

[jira] [Commented] (LOG4J2-1340) AsyncLogger's Ringbuffer holding all JVM memory

    [ https://issues.apache.org/jira/browse/LOG4J2-1340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15220797#comment-15220797 ] 

Remko Popma commented on LOG4J2-1340:
-------------------------------------

To use a ringbuffer with 128 slots, the value to set is 128, not 128*1024 (that's just to make the number more readable).

Currently this cannot be set in the log4j configuration file. You have two options:
# Web containers usually have a file where you can specify system properties. Add an entry  {{AsyncLoggerConfig.RingBufferSize=128}} to that file. 
# Create a file named {{log4j2.component.properties}} and include it in the classpath of your application. Add an entry  {{AsyncLoggerConfig.RingBufferSize=128}} to that file. 

> AsyncLogger's Ringbuffer holding all JVM memory
> -----------------------------------------------
>
>                 Key: LOG4J2-1340
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1340
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.5
>         Environment: Linux 2.6.32-431.17.1.el6.x86_64 x86_64
> java version "1.7.0_75"
> OpenJDK Runtime Environment (rhel-2.5.4.0.el6_6-x86_64 u75-b13)
> OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)
>            Reporter: Soma
>         Attachments: heapdump.JPG
>
>
> JVM getting Out of memory. when I see the heapdump analysis I found 93% of memory occupied by AsyncLogger's RingBuffer. we have total of 5 AsyncLoggers in our applications each having default buffer size.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org