Return-Path: X-Original-To: apmail-phoenix-dev-archive@minotaur.apache.org Delivered-To: apmail-phoenix-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9E66519743 for ; Wed, 27 Apr 2016 08:04:17 +0000 (UTC) Received: (qmail 94371 invoked by uid 500); 27 Apr 2016 08:04:17 -0000 Delivered-To: apmail-phoenix-dev-archive@phoenix.apache.org Received: (qmail 94302 invoked by uid 500); 27 Apr 2016 08:04:17 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 94291 invoked by uid 99); 27 Apr 2016 08:04:17 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Apr 2016 08:04:17 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 879E2C1090 for ; Wed, 27 Apr 2016 08:04:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -5.016 X-Spam-Level: X-Spam-Status: No, score=-5.016 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.996] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id BHyTfl8BM9gT for ; Wed, 27 Apr 2016 08:04:14 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with SMTP id 3C7BD5FAEB for ; Wed, 27 Apr 2016 08:04:14 +0000 (UTC) Received: (qmail 94100 invoked by uid 99); 27 Apr 2016 08:04:12 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Apr 2016 08:04:12 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D3E1D2C14F4 for ; Wed, 27 Apr 2016 08:04:12 +0000 (UTC) Date: Wed, 27 Apr 2016 08:04:12 +0000 (UTC) From: "lichenglin (JIRA)" To: dev@phoenix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (PHOENIX-2860) The phoenix driver may cause memory leak when redeploy By tomcat MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 lichenglin created PHOENIX-2860: ----------------------------------- Summary: The phoenix driver may cause memory leak when redeploy By tomcat Key: PHOENIX-2860 URL: https://issues.apache.org/jira/browse/PHOENIX-2860 Project: Phoenix Issue Type: Bug Affects Versions: 4.6.0 Environment: tomcat7 Reporter: lichenglin I'm using org.apache.commons.dbcp.BasicDataSource to query the server. here is my code in spring.xml {code:xml} {code} But when I used jenkins to redeploy the war ,I got this message in the tomcat's log {code} 27-Apr-2016 15:55:21.579 WARNING [http-nio-9080-exec-36] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [console] appears to have started a thread named [Timer for 'phoenix' metrics system] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.lang.Object.wait(Native Method) java.util.TimerThread.mainLoop(Timer.java:552) java.util.TimerThread.run(Timer.java:505) {code} I'm trying to close the driver when the servlet shutdown with the code {code} @EventListener({ ContextStoppedEvent.class, ContextClosedEvent.class }) public void handleContextStart(ApplicationContextEvent e) throws SchedulerException, InterruptedException, SQLException, IOException { if (deploy) { System.out.println("###################"); source.close(); PhoenixDriver.INSTANCE.close(); } } {code} It doesn't work!! -- This message was sent by Atlassian JIRA (v6.3.4#6332)