[ 
https://issues.apache.org/jira/browse/LOG4J2-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17166912#comment-17166912
 ] 

Ralph Goers edited comment on LOG4J2-2886 at 7/29/20, 6:35 AM:
---------------------------------------------------------------

I don't think I have ever seen a log4j configuration with more appenders.  
could you change the status=INFO to status=DEBUG on the configuration element 
and provide the resulting output from Log4j? Also, how much free space is there 
on the disk before any log files are created and how frequently do these files 
roll over?  Could you attach a directory listing for at least one day's worth 
of files?


was (Author: ralph.go...@dslextreme.com):
I don't think I have ever seen a log4j configuration with more appenders.  
could you change the status=INFO to status=DEBUG on the configuration element 
and provide the resulting output from Log4j?

> File Hangs when Rolling file on log4j
> -------------------------------------
>
>                 Key: LOG4J2-2886
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2886
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.9.1
>         Environment: Java 8, log4j 2.9.1, Linux radhat 7, Websphere 
> Application Server 8.5.5.14
>            Reporter: Luigi Pellico
>            Priority: Major
>         Attachments: log4j2.xml
>
>
> expose my question
> Enviroment:
> Java 8, log4j 2.9.1, Linux radhat 7, Websphere Application Server 8.5.5.14
> Problem:
> When rolling file log the rolled file hangs. Only Websphere Application 
> Server restar resolve problem and empty file system from hangs file.
> This problem cause full disk space on log partition.
> try:
> try to change appender mode but problem remain try solution on this similar 
> question:
>  * [How can I get log4j to delete old rotating log 
> files?|https://stackoverflow.com/questions/1050256/how-can-i-get-log4j-to-delete-old-rotating-log-files]
>  * [Log4j2 Rolled Files that are deleted are still open and disk space not 
> freed|https://stackoverflow.com/questions/27855869/log4j2-rolled-files-that-are-deleted-are-still-open-and-disk-space-not-freed]
> Other info:
> File are deleted but space is not free:
>  {{$ /usr/sbin/lsof | grep deleted}}
>  java 114u REG 253,12 191 8814849 /var/log/archive/<filename>.log (deleted)
> This is log4j configuration:
> {code:java}
>  <RollingRandomAccessFile name="<filename>" fileName="/<filename>.log" 
> filePattern="/archive/<filename>%d {yyyy-MM-dd} %i.log.gz">
>   <ThresholdFilter level="ERROR" onMatch="ACCEPT" onMismatch="DENY"/>
>   <!- Log pattern layout 
> -><PatternLayout><pattern>|%X{traceID}|%m%n</pattern></PatternLayout>
>   <!- File size policy -->
>   <Policies>
>     <TimeBasedTriggeringPolicy />
>     <SizeBasedTriggeringPolicy size="150 MB"/>
>   </Policies>
>   <DefaultRolloverStrategy>
>     <Delete basePath="/archive/" maxDepth="2">
>       <IfFileName glob="<filename>*.log.gz" />
>       <IfLastModified age="7d" />
>     </Delete>
>   </DefaultRolloverStrategy>
> </RollingRandomAccessFile>{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to