Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1431

SizeBasedTriggeringPolicy and FixedWindowRollingPolicy : file grows enormously in some cases

    XMLWordPrintable

Details

    Description

      Hi there, 

      Using logback 1.2.3.

      We have SizeBased and FixedWindow policy described as follows: 

       

      <appender name="METRICS" class="ch.qos.logback.core.rolling.RollingFileAppender">
      <file>{filename}</file>
      <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
      <fileNamePattern>{filename}.%i.log</fileNamePattern>
      <minIndex>1</minIndex>
      <maxIndex>9</maxIndex>
      </rollingPolicy>
      <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
      <maxFileSize>20MB</maxFileSize>
      </triggeringPolicy>
      <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
      <layout class="com.avaya.ept.common.logging.layout.CLFLayout">
      <pattern>|%thread|%level|%logger{15}|%msg%n</pattern>
      </layout>
      </encoder>
      </appender>

       

      Recently we've faced the issue when log file {filename}-1.log grows to the enormous size of 40gb without any particular reason. After removing this log and restarting the application log continues to rotate normally, on ~20mb size mark. 

      We could not analyze the logs as they causes the system to freeze (due to lack of free disk space) and had to be removed ASAP. Is there any particular reason why this could be happen? 

      Using RHEL 6. 

      Attachments

        Activity

          People

            logback-dev Logback dev list
            amartyr Alisa Martirosyan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: