[logback-dev] [JIRA] (LOGBACK-1322) File handles to tmp file kept open after rotation
QOS.CH (JIRA)
noreply-jira at qos.ch
Tue Jul 4 17:17:00 CEST 2017
Ross Ilott created LOGBACK-1322:
-----------------------------------
Summary: File handles to tmp file kept open after rotation
Key: LOGBACK-1322
URL: https://jira.qos.ch/browse/LOGBACK-1322
Project: logback
Issue Type: Bug
Affects Versions: 1.2.3
Environment: <!-- 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>/var/log/kairosdb/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"/>
<!--<logger name="org.hbase.async.RegionClient" level="DEBUG"/>-->
<!--<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>
Reporter: Ross Ilott
Assignee: Logback dev list
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)}}
--
This message was sent by Atlassian JIRA
(v7.3.1#73012)
More information about the logback-dev
mailing list