Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 55490 invoked from network); 14 Apr 2009 14:13:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Apr 2009 14:13:44 -0000 Received: (qmail 35885 invoked by uid 500); 14 Apr 2009 14:13:43 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 35821 invoked by uid 500); 14 Apr 2009 14:13:43 -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 35811 invoked by uid 99); 14 Apr 2009 14:13:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Apr 2009 14:13:43 +0000 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,NORMAL_HTTP_TO_IP,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Apr 2009 14:13:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CAA31234C003 for ; Tue, 14 Apr 2009 07:13:14 -0700 (PDT) Message-ID: <1060420425.1239718394822.JavaMail.jira@brutus> Date: Tue, 14 Apr 2009 07:13:14 -0700 (PDT) From: "Jan Lehnardt (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Commented: (COUCHDB-325) Memory Leak in 9.0? In-Reply-To: <606871782.1239716954904.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12698780#action_12698780 ] Jan Lehnardt commented on COUCHDB-325: -------------------------------------- Can you add some information about what exactly is eating the memory? Ruby or CouchDB? > Memory Leak in 9.0? > ------------------- > > Key: COUCHDB-325 > URL: https://issues.apache.org/jira/browse/COUCHDB-325 > Project: CouchDB > Issue Type: Bug > Affects Versions: 0.9 > Environment: gentoo linux on c1.medium aws instance > Reporter: Rohit Amarnath > Priority: Minor > Fix For: 0.9 > > > I am using couchrest to transform a document from one database to another (millions of records). The memory usage continues to increase till all the memory is used. The process occasionally fails, but usually completes. I dont know enough about ruby/couchrest/couchdb to be able to tell you where the memory is increasing from - but if you give me some direction, I will be happy to take a look. > If I comment out the save, it seems ok. > Here is the code: > -------------------------------- > require 'rubygems' > require 'couchrest' > @db = CouchRest.database!("http://127.0.0.1:5984/xfpds_2008") > @db2 = CouchRest.database!("http://127.0.0.1:5984/fpds_2008") > @streamer = CouchRest::Streamer.new(@db) > @streamer.view("_all_docs") do |row| > begin > doc = @db.get(row["id"]) > # remove id so the new database gets fresh document > doc.delete("_id") > doc.delete("_rev") > # change badgerfish notation to assign $ key value to parent > doc["amounts"]["obligatedAmount"] = doc["amounts"]["obligatedAmount"]["$"] > doc["amounts"]["baseAndAllOptionsValue"] = doc["amounts"]["baseAndAllOptionsValue"]["$"] > doc["amounts"]["baseAndExercisedOptionsValue"] = doc["amounts"]["baseAndExercisedOptionsValue"]["$"] > ...... A whole bunch of fields > # save the document using bulk save > response = @db2.save_doc(doc,true) > rescue > # if streamer ends, save last few documents > @db2.bulk_save > end > end -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.