Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 99654 invoked from network); 2 Jan 2011 21:53:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Jan 2011 21:53:51 -0000 Received: (qmail 80150 invoked by uid 500); 2 Jan 2011 21:53:49 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 80110 invoked by uid 500); 2 Jan 2011 21:53:49 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 80102 invoked by uid 99); 2 Jan 2011 21:53:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Jan 2011 21:53:49 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of adam.kocoloski@gmail.com designates 209.85.212.52 as permitted sender) Received: from [209.85.212.52] (HELO mail-vw0-f52.google.com) (209.85.212.52) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Jan 2011 21:53:44 +0000 Received: by vws13 with SMTP id 13so5446622vws.11 for ; Sun, 02 Jan 2011 13:53:22 -0800 (PST) Received: by 10.220.180.202 with SMTP id bv10mr5499295vcb.94.1294005202418; Sun, 02 Jan 2011 13:53:22 -0800 (PST) Received: from [10.0.1.2] (c-71-232-49-44.hsd1.ma.comcast.net [71.232.49.44]) by mx.google.com with ESMTPS id bq5sm4014775vcb.8.2011.01.02.13.53.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 02 Jan 2011 13:53:21 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1082) Subject: Re: Multiple couchjs processes being spawned From: Adam Kocoloski In-Reply-To: Date: Sun, 2 Jan 2011 16:53:18 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1082) These reports do sound suspiciously like the problems described in = COUCHDB-901 that caused us to rewrite the OS process management in = BigCouch. Mahesh, yours is the first report I've heard that = specifically implicated view compaction. That's significant. I didn't = understand what you meant by "clobber all the views", though. I'll poke around and see if I can devise a scenario where the OS process = would not be released after view compaction. In my experience the = internal ets tables maintained in CouchDB to track OS processes got = out-of-sync - one table would report 1000 available processes, while = another table would claim only 2. Best, Adam On Jan 2, 2011, at 12:25 PM, Mahesh Paolini-Subramanya wrote: > Sorry - apologies - hit Send by accident :-( >=20 > Wow - wierdness here. I'm running 1.0.1, and have noticed the same = thing > happening. The specific (and very replicable - for me at least) = scenario is > as follows > - I've got around a thousand dbs, each with around 50K documents, and = each > with about 5 (javascript) design documents. > - I clobber all the views, and remotely (LWP::UserAgent) compact the = view > ($db/_compact/$design) > - THe compaction of the design document results in the design exactly = being > generate (this is good_ > - The compaction also leave a couchjs process just lying around (this = would > be bad) > - After a few thousand couchjs processes, couchdb just chokes. >=20 > Any ideas? This related in any way to the process issues in BigCouch = (Jira > -901)? >=20 > cheers >=20 >=20 >=20 >=20 > On Mon, Sep 7, 2009 at 12:18 AM, Paul Davis = wrote: >=20 >> Another random thought, after your clients have been running a bit, = an >> easy way to check why type of stuff is going on with sockets is: >>=20 >> $ netstat -ap tcp >>=20 >> If your apps have periods of high turnover, check the sockets to see >> if you have lots of them in TIME_WAIT state. >>=20 >> Paul >>=20 >> On Sun, Sep 6, 2009 at 11:39 PM, Arun Thampi = wrote: >>> Thanks Paul for the quick response. I'll poke around further to see = if >> there >>> is anything amiss and will keep the list posted. >>> Cheers, >>> Arun >>>=20 >>> On Mon, Sep 7, 2009 at 11:24 AM, Paul Davis = >> wrote: >>>=20 >>>> The algorithm for CouchDB's use of OS processes is pretty simple: >>>>=20 >>>> "Give me an os process plz" >>>>=20 >>>> If none are available, then it creates a new one. A large number of = OS >>>> processes would suggest to me that something isn't releasing OS >>>> processes correctly. My first guess would be to look at _list and >>>> _show as those both require an OS process, but are also at the = mercy >>>> of client connection semantics. I might be reaching a bit, but I >>>> wonder if CouchRest is failing to close sockets properly. Its not = much >>>> more than a random finger pointing, but there have been other = errors >>>> recently that also suggest CouchRest isn't doing proper socket >>>> handling. >>>>=20 >>>> The other possibility is there's something weird with killing >>>> processes, but couchspawnkillable should've fixed that. >>>>=20 >>>> HTH, >>>> Paul Davis >>>>=20 >>>> On Sun, Sep 6, 2009 at 11:18 PM, Arun Thampi >> wrote: >>>>> Hi guys - Been running CouchDB trunk(r804727) in production for = about >> 3 >>>>> weeks now and one thing I've noticed is that the number of couchjs >>>> processes >>>>> (/usr/local/lib/couchdb/bin/couchjs >>>> /usr/local/share/couchdb/server/main.js) >>>>> keeps increasing to a large amount. Is this normal? Does CouchDB >> manage >>>>> these processes and eventually kill inactive couchjs processes? >>>>> Just FYI I'm using CouchRest as part of a Rails app to query two >>>> different >>>>> views in my db. >>>>>=20 >>>>> Thanks in advance. >>>>>=20 >>>>> Cheers, >>>>> Arun >>>>>=20 >>>>> -- >>>>> It's better to be a pirate than join the Navy - Steve Jobs >>>>> http://mclov.in >>>>>=20 >>>>=20 >>>=20 >>>=20 >>>=20 >>> -- >>> It's better to be a pirate than join the Navy - Steve Jobs >>> http://mclov.in >>>=20 >>=20 >=20 >=20 >=20 > --=20 > Mahesh Paolini-Subramanya | CTO | mahesh@aptela.com | 703.386.1500 = Ext. 9100 > 13454 Sunrise Valley Drive | Suite 500 | Herndon, VA