0

Sometimes we have the issue that the log rotate will duplicate the current log file until the disk runs out of space. We don't see any issues in the log files and we were wondering how this could happen as we are using the standard PeriodicSizeRotatingFileHandler from JBoss.

Server version: Windows Web Server 2008 R2

JBoss EAP version: 6.4.17

Please find below a part of our standalone.xml

<subsystem xmlns="urn:jboss:domain:logging:1.5">
<custom-handler name="FILE" class="org.jboss.logmanager.handlers.PeriodicSizeRotatingFileHandler" module="org.jboss.logmanager">
    <level name="INFO"/>
    <formatter>
        <pattern-formatter pattern="%d{yyyyMMdd HH:mm:ss,SSS} %-5p [%c{1}] (%t) %s%E [MDC:ibizaId=%X{ibizaId}]%n"/>
    </formatter>
    <properties>
        <property name="append" value="true"/>
        <property name="rotateSize" value="200000000"/>
        <property name="maxBackupIndex" value="1000"/>
        <property name="suffix" value=".yyyy-MM-dd"/>
        <property name="fileName" value="${jboss.server.log.dir}/server.log"/>
    </properties>
</custom-handler>
</subsystem>

Unfortunately I couldn't find anything related to this issue on Google.

Danny Gloudemans
  • 2,597
  • 7
  • 39
  • 57
  • Do you have anything monitoring the log files or a virus scanner scanning the directory? – James R. Perkins Oct 19 '17 at 20:08
  • @JamesR.Perkins Sophos Protection is running on these servers, but I can't find anything in the logs of that application. The strange thing is that not all duplicate files are exactly the same, they have +/- 95% the same content, the first entry for the log file is the same for all, only some stop earlier then the others.. – Danny Gloudemans Oct 20 '17 at 07:12
  • What *could* be happening is the `java.io.File.delete()` fails and the new content is appended to the old content. This *may* be due to Windows locking the file. – James R. Perkins Oct 20 '17 at 17:43

0 Answers0