Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-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 E564E10DA0 for ; Tue, 11 Feb 2014 21:21:27 +0000 (UTC) Received: (qmail 36026 invoked by uid 500); 11 Feb 2014 21:21:20 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 35979 invoked by uid 500); 11 Feb 2014 21:21:20 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 35968 invoked by uid 99); 11 Feb 2014 21:21:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Feb 2014 21:21:19 +0000 Date: Tue, 11 Feb 2014 21:21:19 +0000 (UTC) From: "Paul Joseph Davis (JIRA)" To: dev@couchdb.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (COUCHDB-2058) CouchDB Memory Leak - Beam.smp 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/COUCHDB-2058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13898325#comment-13898325 ] Paul Joseph Davis commented on COUCHDB-2058: -------------------------------------------- Rohit, can you do that process before and after you see CouchDB collecting large amounts of RAM? Unless you specifically looked at top before running it would appear to have been a mostly idle instance that didn't have much garbage. If you did look at top and it had gigabytes allocated then we may have a real leak in a NIF somewhere. I'd be a bit surprised that a NIF is leaking given we haven't changed them for a few releases to my knowledge. > CouchDB Memory Leak - Beam.smp > ------------------------------ > > Key: COUCHDB-2058 > URL: https://issues.apache.org/jira/browse/COUCHDB-2058 > Project: CouchDB > Issue Type: Bug > Security Level: public(Regular issues) > Components: Database Core > Reporter: Rohit Sharma > > Hello, > I am experiencing performance issue with CouchDB. > Use Case: I am working on a process that retrieves the data from RDBMS and process them into JSON document and POST them to the CouchDB. > I am trying to POST around half a million documents, most of them in batches (_bulk_doc) of 10,000 and have tried with batch of 5,000, 15,000, and 20,000. > Whole process takes around 90-100 minutes. > During the life of the process, Memory Consumption by CouchDB keeps on growing and memory is not released when CouchDB has finished working. > So if the memory consumption by CouchDB was 60% at the time process finishes, memory consumption will remain 60% and not reducing. > Subsequently, when the process starts running again. memory consumption is Maxed out and CouchDB restarts itself. This restart fails the process that I am running. Looking at the Syslogs , I see Out Of Memory Error by the CouchDB process and killing statement. > The CouchDb process that has the issue is the "beam.smp" of Erlang. > At this point, I have tried upgrading the memory of the server to see if this resolves the issue, unfortunately, the issue persists. Memory Leak is there and Usage keeps on growing until CouchDB restarts/crashed. > I also have tried running garbage collection from Erlang command (erlang:garbage_collect().) line but it didn't do anything. > At this point, I am out of ideas and not sure what is going on here. Any input/suggestion is highly appreciated! > Env: > Platform: Linux (Red Hat release 6.4 (Santiago)) > CouchDB: 1.3 and have tried with 1.5 as well > RAM: Tried with 2G, 4G, and 8G > CPU: 2 cores > Process:/usr/lib64/erlang/erts-5.8.5/bin/beam.smp -Bd -K true -A 4 -- -root /usr/lib64/erlang -- This message was sent by Atlassian JIRA (v6.1.5#6160)