ramanathan1504 opened a new issue, #4391:
URL: https://github.com/apache/logging-log4j2/issues/4391

   Since #4165, `RollingFileManager.asyncExecutor` is a 
`ScheduledThreadPoolExecutor(1, threadFactory)`. In 2.26.1 it was `new 
ThreadPoolExecutor(0, Integer.MAX_VALUE, 0, TimeUnit.MILLISECONDS, new 
EmptyQueue(), threadFactory)`.                                                  
                                                                   
                                                                                
                                                                                
                   
   A core thread of a `ScheduledThreadPoolExecutor` never times out. So after 
the first rollover, each rolling appender keeps one thread, named               
                   
   `Log4j2-TF-<n>-RollingFileManager-<n>`, until the manager is stopped. 
`Log4jThreadFactory.createThreadFactory` makes non-daemon threads. If the 
application does not call     
   `LogManager.shutdown()`, the JVM does not exit when `main` returns.          
                                                                                
                 
                                                                                
                                                                                
                   
   With 30 rolling appenders, 2.26.1 leaves no such threads and the JVM exits. 
`2.x` leaves 30 and the JVM keeps running.                                      
                  
                                                                                
                                                                                
                   
   First noticed in 
https://github.com/apache/logging-log4j2/issues/4356#issuecomment-5998740638. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to