5

I configure my company's system to have all loggers be asynchronous by setting the system property Log4jContextSelector to org.apache.logging.log4j.core.async.AsyncLoggerContextSelector. We use log4j 2.0.

There is no problem when I run a small input file through the system. But when I ran a bigger input file (our system is supposed to ran much bigger file than this), OutOfMemoryError is caused. Information is as below:

SEVERE: Exception processing: 14451294 org.apache.logging.log4j.core.async.RingB  ufferLogEvent@226dc6bf
java.lang.OutOfMemoryError: Java heap space

Then I increased the max heap size to 4 gigs (total physical memory is 8G) and another problem is caused:

SEVERE: Exception processing: 775221 org.apache.logging.log4j.core.async.RingBufferLogEvent@1c6b80a9
java.lang.OutOfMemoryError: GC overhead limit exceeded
1
  • are u auditing something? can u post a sample code if possible? Commented Oct 1, 2013 at 12:47

1 Answer 1

2

The Log4J team is aware of this: https://issues.apache.org/jira/browse/LOG4J2-414


Update 2018-2-2:

The original problem and the above JIRA ticket were raised 5 years ago against Log4j 2.0-beta9.

This is many years later. The Log4j2 community is about to release Log4j 2.11. Several memory leak bugs have been fixed since version 2.0-beta 9.

If anyone experiences this problem with a recent version of Log4j2 please raise a new JIRA ticket since this should not happen.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.