You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2008/03/28 10:06:54 UTC

DO NOT REPLY [Bug 44700] New: Log4J locks rolled log files

https://issues.apache.org/bugzilla/show_bug.cgi?id=44700

           Summary: Log4J locks rolled log files
           Product: Log4j
           Version: 1.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Appender
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: jethro.bakker@ordina.nl


Hello,

Currently I am facing the following problem with Log4J (v1.2.8 but also in
v1.2.15). We use the DailyRollingFileAppender. Most of the log files are rolled
once a day, but a few once an hour. The rolling proces seems ok, new files are
created and the data in the files looks good. 

The problem is that the applicationserver (WAS 6) holds a lock on the rolled
files. We can not delete those files from the filesystem.
With the unix command fuser we can see which process is holding which log file.
For example:

common.log:  1302780 
common.log.2008-03-25-11: 
common.log.2008-03-26-13: 
common.log.2008-03-26-19: 
common.log.2008-03-26-20: 
common.log.2008-03-26-21:  1302780 

The latest log file: common.log.2008-03-26-21 should not be locked! We have a
workaround by using the touch command on the log4j.xml. The log configuration
is (re)initialized and releases all the locks.

What can we do about this problem?


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 44700] Log4J locks rolled log files

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44700

Johannes <jt...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #2 from Johannes <jt...@gmail.com> 2010-11-24 17:40:29 EST ---
We are experiencing the same problem with log4j 1.2.16 running on a jetty web
app on a Redhat machine.

The rollover logic appears to work just fine, but the java process holds a
reference to the rotated files, so that we cannot delete them.

Please let me know if you need more info.

Here is an excerpt form our log4j.xml
[...]
    <appender name="slm-debug-async" class="org.apache.log4j.AsyncAppender">
        <appender-ref ref="slm-debug"/>
    </appender>
    <appender name="slm-debug"
class="org.apache.log4j.DailyRollingFileAppender">
        <errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler"/>

        <!-- Rollover at midnight each day -->
        <param name="DatePattern" value="'.'yyyy-MM-dd"/>

        <param name="File" value="@log.dir@/server.log"/>
        <param name="Append" value="true"/>

    </appender>
[...]
    <root>
        <appender-ref ref="slm-debug-async"/>
    </root>
[...]

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 44700] Log4J locks rolled log files

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44700


Thorbjørn Ravn Andersen <th...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 44700] Log4J locks rolled log files

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44700

Johannes <jt...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jtuchscherer@gmail.com

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 44700] Log4J locks rolled log files

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44700


Jethro Bakker <je...@ordina.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Windows XP                  |AIX




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 44700] Log4J locks rolled log files

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44700


Thorbjørn Ravn Andersen <th...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thorbjoern@gmail.com




--- Comment #1 from Thorbjørn Ravn Andersen <th...@gmail.com>  2008-07-03 12:56:34 PST ---
Can you please provide the log4j.xml file as an attachment for the issue
reported?  

Also please describe the applications running in the WAS6 server.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org