Return-Path: X-Original-To: apmail-logging-log4j-dev-archive@www.apache.org Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4E12218F92 for ; Wed, 9 Mar 2016 05:05:41 +0000 (UTC) Received: (qmail 24176 invoked by uid 500); 9 Mar 2016 05:05:41 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 24105 invoked by uid 500); 9 Mar 2016 05:05:41 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 24085 invoked by uid 99); 9 Mar 2016 05:05:41 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Mar 2016 05:05:41 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id BFBDC2C1F64 for ; Wed, 9 Mar 2016 05:05:40 +0000 (UTC) Date: Wed, 9 Mar 2016 05:05:40 +0000 (UTC) From: "Ralph Goers (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (LOG4J2-1116) upgrade to log4j2 causes too frequent minor gc MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LOG4J2-1116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15186503#comment-15186503 ] Ralph Goers edited comment on LOG4J2-1116 at 3/9/16 5:04 AM: ------------------------------------------------------------- My understanding is that this problem only exists in cases where the Object itself has a reference to the ClassLoader. So if the ThreadLocal has a Message instance then de-referencing the ThreadLocal during log4j shutdown will cause that ThreadLocal to be garbage collected. We have several classes that use ThreadLocals now. Are you saying that these are all currently causing problems during web app shutdown? Note - I'm assuming that the ThreadLocal itself is not declared as a static but as a member of a singleton class. was (Author: ralph.goers@dslextreme.com): My understanding is that this problem only exists in cases where the Object itself has a reference to the ClassLoader. So if the ThreadLocal has a Message instance then de-referencing the ThreadLocal during log4j shutdown will cause that ThreadLocal to be garbage collected. We have several classes that use ThreadLocals now. Are you saying that these are all currently causing problems during web app shutdown? > upgrade to log4j2 causes too frequent minor gc > ---------------------------------------------- > > Key: LOG4J2-1116 > URL: https://issues.apache.org/jira/browse/LOG4J2-1116 > Project: Log4j 2 > Issue Type: Bug > Components: Core > Affects Versions: 2.3 > Environment: jdk1.6 > slf4j 1.7.9 > log4j2.3 > Reporter: Mingjiang Shi > Priority: Critical > > We used slf4j+log1.2 in our spring web application. Due to the log4j1.0 performance issue, we upgrade it to log4j2. When it goes to production, it experienced very frequent minor gc (once per second) even though the eden area is not full. For example, the eden area just occupied 10%, the minor gc also happens. The issue disappears when rolling back to log4j1.2. > Can anyone show some hints on diagnose this issue? Thanks! -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org