Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
1.1.7, 1.2.3
-
<!-- For assistance related to logback-translator or configuration --> <!-- files in general, please contact the logback user mailing list --> <!-- at http://www.qos.ch/mailman/listinfo/logback-user --> <!-- --> <!-- For professional support please see --> <!-- http://www.qos.ch/shop/products/professionalSupport --> <!-- --> <configuration> <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level [%file:%line] - %msg%n</pattern> </encoder> </appender> <appender name="logfile" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>log/kairosdb.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!-- daily rollover --> <fileNamePattern>log/kairosdb.%d.%i.log.gz</fileNamePattern>}}<!-- keep 30 days' worth of history --> <maxHistory>30</maxHistory>}}<!-- or whenever the file size reaches 100MB --> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> <maxFileSize>100MB</maxFileSize> </timeBasedFileNamingAndTriggeringPolicy>}}<!-- Whenever startup, will run the rollover --> <cleanHistoryOnStart>true</cleanHistoryOnStart> </rollingPolicy> <encoder> <pattern>%d{MM-dd|HH:mm:ss.SSS} [%thread] %-5level [%file:%line] - %msg%n</pattern> </encoder> </appender>}}<logger name="com.mchange.v2.c3p0" level="WARN"/><Unable to render embedded object: File (--<logger name="org.hbase.async.RegionClient" level="DEBUG"/>-->}}{{<) not found.--<logger name="org.kairosdb.core.aggregator.SumAggregator" level="DEBUG"/> <logger name="org.kairosdb.datastore.cassandra.CassandraDatastore" level="DEBUG"/>-> <!<logger name="org.kairosdb.core.http.rest.MetricsResource" level="DEBUG"/>-><root level="INFO"> <appender-ref ref="stdout"/>}} <appender-ref ref="logfile"/>}} </root>}} </configuration>
<!-- For assistance related to logback-translator or configuration --> <!-- files in general, please contact the logback user mailing list --> <!-- at http://www.qos.ch/mailman/listinfo/logback-user --> <!-- --> <!-- For professional support please see --> <!-- http://www.qos.ch/shop/products/professionalSupport --> <!-- --> <configuration> <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level [%file:%line] - %msg%n</pattern> </encoder> </appender> <appender name="logfile" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>log/kairosdb.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!-- daily rollover --> <fileNamePattern>log/kairosdb.%d.%i.log.gz</fileNamePattern>}}<!-- keep 30 days' worth of history --> <maxHistory>30</maxHistory>}}<!-- or whenever the file size reaches 100MB --> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> <maxFileSize>100MB</maxFileSize> </timeBasedFileNamingAndTriggeringPolicy>}}<!-- Whenever startup, will run the rollover --> <cleanHistoryOnStart>true</cleanHistoryOnStart> </rollingPolicy> <encoder> <pattern>%d{MM-dd|HH:mm:ss.SSS} [%thread] %-5level [%file:%line] - %msg%n</pattern> </encoder> </appender>}}<logger name="com.mchange.v2.c3p0" level="WARN"/><Unable to render embedded object: File (--<logger name="org.hbase.async.RegionClient" level="DEBUG"/>-->}}{{<) not found.--<logger name="org.kairosdb.core.aggregator.SumAggregator" level="DEBUG"/> <logger name="org.kairosdb.datastore.cassandra.CassandraDatastore" level="DEBUG"/>-> <!<logger name="org.kairosdb.core.http.rest.MetricsResource" level="DEBUG"/>-><root level="INFO"> <appender-ref ref="stdout"/>}} <appender-ref ref="logfile"/>}} </root>}} </configuration>
Description
I'm using kairosdb 1.1.3 which uses logback as it's logging library. When the log reaches 100MB the log rotates successfully, but many .tmp files are held open, resulting in the disk space not being freed up:
java 13075 31552 root 2w REG 253,1 104911776 589454 /opt/kairosdb/log/kairosdb.log1696340173764370.tmp (deleted)
java 13075 31561 root 1w REG 253,1 104911776 589454 /opt/kairosdb/log/kairosdb.log1696340173764370.tmp (deleted)
java 13075 31561 root 2w REG 253,1 104911776 589454 /opt/kairosdb/log/kairosdb.log1696340173764370.tmp (deleted)
java 13075 31632 root 1w REG 253,1 104911776 589454 /opt/kairosdb/log/kairosdb.log1696340173764370.tmp (deleted)
java 13075 31632 root 2w REG 253,1 104911776 589454 /opt/kairosdb/log/kairosdb.log1696340173764370.tmp (deleted)
java 13075 31637 root 1w REG 253,1 104911776 589454 /opt/kairosdb/log/kairosdb.log1696340173764370.tmp (deleted)
java 13075 31637 root 2w REG 253,1 104911776 589454 /opt/kairosdb/log/kairosdb.log1696340173764370.tmp (deleted)
java 13075 31639 root 1w REG 253,1 104911776 589454 /opt/kairosdb/log/kairosdb.log1696340173764370.tmp (deleted)
java 13075 31639 root 2w REG 253,1 104911776 589454 /opt/kairosdb/log/kairosdb.log1696340173764370.tmp (deleted)
I tried updating the the latest versions of logback-core and logback-classic, but still see the same issue
Attachments
Issue Links
- blocks
-
LOGBACK-1350 After rolling logback writes to the old and the new file (rolls-over twice)
- Open