Contention at: org.apache.logging.log4j.core.appender.rolling.RollingFileManager.checkRollover()
This is a problem with high concurrency, and it works as designed. The file system (I/O) doesn't have enough performance as required.
The synchronized makes BLOCKED some Java monitor when trying to acquire the resource.
The solution as mentioned above is to move to Async logging.
https://logging.apache.org/log4j/2.x/manual/async.html
The synchronized makes BLOCKED some Java monitor when trying to acquire the resource.
/**
* Determines if a rollover should occur.
* @param event The LogEvent.
*/
public synchronized void checkRollover(final LogEvent event) {
if (triggeringPolicy.isTriggeringEvent(event)) {
rollover();
}
}
The solution as mentioned above is to move to Async logging.
https://logging.apache.org/log4j/2.x/manual/async.html
No comments :
Post a Comment