Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A188B200C03 for ; Fri, 6 Jan 2017 23:16:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9E574160B39; Fri, 6 Jan 2017 22:16:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F22A8160B37 for ; Fri, 6 Jan 2017 23:15:59 +0100 (CET) Received: (qmail 74273 invoked by uid 500); 6 Jan 2017 22:15:59 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 74202 invoked by uid 99); 6 Jan 2017 22:15:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jan 2017 22:15:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id DE0972C03DC for ; Fri, 6 Jan 2017 22:15:58 +0000 (UTC) Date: Fri, 6 Jan 2017 22:15:58 +0000 (UTC) From: "Sergey Shelukhin (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-15551) memory leak in directsql for mysql+bonecp specific initialization MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 06 Jan 2017 22:16:00 -0000 [ https://issues.apache.org/jira/browse/HIVE-15551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Shelukhin updated HIVE-15551: ------------------------------------ Summary: memory leak in directsql for mysql+bonecp specific initialization (was: memory leak in directsql for mysql specific initialization) > memory leak in directsql for mysql+bonecp specific initialization > ----------------------------------------------------------------- > > Key: HIVE-15551 > URL: https://issues.apache.org/jira/browse/HIVE-15551 > Project: Hive > Issue Type: Bug > Components: Metastore > Affects Versions: 0.13.0 > Reporter: Xiaomin Zhang > Assignee: Xiaomin Zhang > Attachments: HIVE-15551.patch.txt > > > We observed HMS memory leak when directsql is enabled for MySQL metastore DB. > The affected code is in the method MetaStoreDirecdtSql.executeNoResult(): > ((Connection)jdoConn.getNativeConnection()).createStatement().execute(queryText); > The statement object (from createStatement()) is unfortunately referenced in the Connection object. Although close() is called on the Connection object in finally block, the BoneCP just moves it to a freeConnection list. Hence, statement object never get chances to be closed. > The leaked statement object is not huge (~1KB as observed in memory analyzer). However long running Hive Metastore Server is very likely ended up with bad performance doing frequent garbage collection. -- This message was sent by Atlassian JIRA (v6.3.4#6332)