[logback-dev] [JIRA] (LOGBACK-1335) Internal logback threads with same name created at server startup

QOS.CH (JIRA) noreply-jira at qos.ch
Mon Aug 14 11:02:00 CEST 2017


Kirti Singh created LOGBACK-1335:
------------------------------------

             Summary: Internal logback threads with same name created at server startup
                 Key: LOGBACK-1335
                 URL: https://jira.qos.ch/browse/LOGBACK-1335
             Project: logback
          Issue Type: Bug
          Components: logback-core
    Affects Versions: 1.1.7
         Environment: Linux

application deployed on apache tomcat
            Reporter: Kirti Singh
            Assignee: Logback dev list
         Attachments: logback.jpg

*Scenario:*

I have a web application written in java. The application is deployed on multiple linux servers on apache tomcat(version 8.0.41). I am using springboot starter managed logback.

Spring version: 1.3.5.RELEASE

this version internally manages 1.7.1 version of logback. My logback file has timebased as well as sizebased policy set. 

*Issue:* I am observing a sporadic issue on few servers where log file breaks into two at random time. The weird part is that the file that gets rolled over has last day's date(instead of today's date) and future logs keep getting written to this rolled file instead of the new file that is created.

 

*Observation:* I connected my application with visualvm and saw that two internal threads of logback are created with the same name. I have attached a screenshot from visualvm showing two threads with logback-1 name and two threads named logback-2. Ideally this should not happen because "Threads created internally by logback are now named _logback-n_, where _n_ is an integer. For the first thread _n_ is set to 1, for each successive thread _n_ is incremented by 1."(ref: [https://logback.qos.ch/news.html).]

I have a hunch that somehow logback is misbehaving to create two threads at server startup.

*For notice:* This is not happening across all the servers. This is sporadic. Also, All our servers have equal load balancing in place. 



--
This message was sent by Atlassian JIRA
(v7.3.1#73012)


More information about the logback-dev mailing list