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