Return-Path: X-Original-To: apmail-logging-log4j-user-archive@www.apache.org Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 01CDC19E07 for ; Thu, 31 Mar 2016 20:14:58 +0000 (UTC) Received: (qmail 85673 invoked by uid 500); 31 Mar 2016 20:14:52 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 85618 invoked by uid 500); 31 Mar 2016 20:14:52 -0000 Mailing-List: contact log4j-user-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@logging.apache.org Received: (qmail 85602 invoked by uid 99); 31 Mar 2016 20:14:52 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Mar 2016 20:14:52 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 444711A0139 for ; Thu, 31 Mar 2016 20:14:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id aeDBnThp6w1E for ; Thu, 31 Mar 2016 20:14:50 +0000 (UTC) Received: from mail-vk0-f52.google.com (mail-vk0-f52.google.com [209.85.213.52]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 833655F19D for ; Thu, 31 Mar 2016 20:14:50 +0000 (UTC) Received: by mail-vk0-f52.google.com with SMTP id e6so117762204vkh.2 for ; Thu, 31 Mar 2016 13:14:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=d424SDdYPTddW+LPui5KkG1dBWuUY0arHfmYafjXkWA=; b=pbBh+5F2MASyuThOztYARWVHY/1UXOzBz3bRUuPCC0iUKOE+JoWBdrBJRD/N6LI0HT FK/8A5MBRC+oQ5fP4Tf0sUMCXCIoAGPqv3TRFAji63ev14cE5nGBGJCJF2ShpSRSNKJZ vn6wY2FYfzmdt+2Uq9a7U77gabwydEpnpujVE8z1CyAz2vB0ACtFGPyrqNX1sR1Tag/i qP+VW00thMOM53/TtIMegn7OZQb4E+6VzCCPw51FB9sr+4D9za586dP7esDrn++Zdf2W /6fj1jLRvZ+m9yZI0rxAJEhnMehSZpg956GNb6eDXXX+PvkHOsTV18WuPJ7FwkPkyMzs 06RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=d424SDdYPTddW+LPui5KkG1dBWuUY0arHfmYafjXkWA=; b=A7urJjD+tv44EHZbjJh8/SQjggEQTfEqJp+shH+pp5++XUZMLg6ezJe9EbXceGNuVU 9yPkM4uAfYpt4pVGYUwwLnPgXJ+F6IAJh8mCps8+ghioP9RwqMAl3eRHK49GGiSduXry 3bgBeGxPOe3KMuM/EI7DUQTZ85L82uUMoQu1+vTWJKSHLOZ37PO4c+23jQWwiT0d8qta zsWDOXbj12TL6wXoUhtdAn3ZAl1x8eWVzU8neXytwA0NG4PVml/ihmBqSn2rBysTfhBK tiZes4JuuZLjLwH8zgpE1arxCJKhHqGJ2gQ3UJrlHHEAUmgOVk1lbJ0UiEMQ8tP1CbXB nR7w== X-Gm-Message-State: AD7BkJKvUvk1CDGLEqKBhtsyIzNX0J6d+sgPwAoh1F3bYwLtipaLr1jwVxXPTFc8U/Mg4eq9uCPKS/S2SsJ7JA== MIME-Version: 1.0 X-Received: by 10.176.1.82 with SMTP id 76mr680426uak.78.1459455289792; Thu, 31 Mar 2016 13:14:49 -0700 (PDT) Received: by 10.31.211.129 with HTTP; Thu, 31 Mar 2016 13:14:49 -0700 (PDT) Date: Thu, 31 Mar 2016 13:14:49 -0700 Message-ID: Subject: rolled log file continues to grow unbound From: Simon Chan To: log4j-user@logging.apache.org Content-Type: multipart/alternative; boundary=001a1135199a1d2260052f5dea5f --001a1135199a1d2260052f5dea5f Content-Type: text/plain; charset=UTF-8 Greetings, Hope someone has heard of the problem below or can suggest workarounds or how to debug this thing. Problem: ======= - After rolling, the old (rotated) log file continues to pick up entries and grows. The new log file picks up WARN and INFO level logs. The old/rolled file picks up ERROR level logs. - After max rotations, the filename no longer visible to "ls". But the Java process still has 2 file descriptors pointing at the deleted file. The file will keep growing until it eats up all disk space. - Only a handful systems have this problem. We have about 20 systems in the lab and most of them rotate correctly. One system has this bug happening 100% of the time, meaning after restarting the Java process, the rotation problem appears at the first rollover. It is our stress test system and generates quit a bit of log entries (busy but not ridiculously busy). - 3 other systems entered the above state after moderate effort to filled the log file to trigger rolling. Other Symtoms: ============= Output from the command "ls -l /proc//fd | grep catalina.out": Mar 31 11:21 1 -> /var/log/tomcat/catalina.out.1 Mar 31 11:21 111 -> /var/log/tomcat/catalina.out Mar 31 11:21 2 -> /var/log/tomcat/catalina.out.1 We have another Java process using identical log4j properties file (except the log filename part). This process has no rotation problem. "lsof | grep log4j" output shows this other process has handles to log4j-1.2.15.jar. But the tomcat process which has rotation problem does not?! Not sure if this means anything. History and Environment: ======================= We have been using log4j since 2012 without any issues. There are about 200 customers using this configuration: - CentOS 6.4, 6.5 and 6.6 (systems upgrade to latest CentOS releases) - Java 6 (openjdk) - tomcat 6.0.32 - log4j 2.15 (base on the filename log4j-1.2.15.jar) - Dell server with 16G RAM and 12 CPU cores (2 sockets X 6 cores) This problem appears recently when we upgrade our system to the followings: - CentOS 6.7 - Java 8 (currently java-1.8.0-openjdk-1.8.0.77-0.b03) - tomcat 6.0.45 (at one point the stress test system used 6.0.32 and already exhibited the rotation problem) - log4j 2.15 log4j.properties: ================ log4j.rootLogger=WARN, R ##rolling appender log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=${catalina.home}/logs/catalina.out log4j.appender.R.MaxFileSize=10MB log4j.appender.R.MaxBackupIndex=10 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n ## logging levels log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=WARN log4j.logger.org.apache.catalina.core=WARN log4j.logger.org.apache.catalina.session=WARN log4j.logger.com.ourcompany=INFO tomcat config ========== Probably relevant but there are multiple conf files and web.xml and I don't know which involve logging. Regards, Simon --001a1135199a1d2260052f5dea5f--