Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 76569 invoked from network); 23 Nov 2009 22:42:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Nov 2009 22:42:34 -0000 Received: (qmail 47077 invoked by uid 500); 23 Nov 2009 22:42:33 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 47026 invoked by uid 500); 23 Nov 2009 22:42:33 -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 47016 invoked by uid 99); 23 Nov 2009 22:42:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Nov 2009 22:42:33 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.211.204 as permitted sender) Received: from [209.85.211.204] (HELO mail-yw0-f204.google.com) (209.85.211.204) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Nov 2009 22:42:25 +0000 Received: by ywh42 with SMTP id 42so5717476ywh.28 for ; Mon, 23 Nov 2009 14:42:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=6NdwRDi/sp0pubrsiWN3Uu7yylfFEWIAenPmXCxFX5s=; b=XESpTdJUuAyNER0mGdkp1+8FEzVLcOiIBw5DSgcczowuZ/PGjgEhKnxmkd7/GBuW7T jtXT7x0IuyoEyH+4Ovq8xWIXurj7DnjGak2UzAh1KwB3xzVPelG8nBgz9eCrZqQzdIcI qRpcSoBJInbGq4Swigo9WXJuxY+naiN5I0I3I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=R4Lwf4GneoncDK68rNI4AVhf1q4fXFWox8p4q93K2ly810VcEC65tLOllTZkIapVh2 FUXZs6gQINgccOXYr5unmQlS7jdNZNpTKmrrIj0r3FK7SDSkMkhRVyAGt7QJ452zOW8/ qEiXCwXayythXnR6Vt8XyYMyuecVWkx+iM74U= MIME-Version: 1.0 Received: by 10.100.245.22 with SMTP id s22mr936305anh.136.1259016124126; Mon, 23 Nov 2009 14:42:04 -0800 (PST) In-Reply-To: <45ae90370911231435p64486788v6248a03c0d3aac8e@mail.gmail.com> References: <45ae90370911231435p64486788v6248a03c0d3aac8e@mail.gmail.com> From: Paul Davis Date: Mon, 23 Nov 2009 17:41:44 -0500 Message-ID: Subject: Re: all_dbs_active - what should an app do when it gets this? To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Nov 23, 2009 at 5:35 PM, Jeff Macdonald wrote: > Hi all, > > I have a simple app that is creating a lot of databases. Eventually > when I get to some number of databases, I get this error > all_dbs_active on insert. I thought I just sleep (ick) and try again, > but when I went to Futon after the program was done for many minutes, > I get that error in the web interface too. So I'm rather puzzled at > what to do. I'm sure there is some config var somewhere where I can up > that limit, but I'm more interested in what the proper thing to do > when such a limit is met. > > TIA > > -- > Jeff Macdonald > Ayer, MA > Other than increase the max_open_dbs configuration option, I can't think of anything 'elegant' that you could do client side other than backoff in your script for the db creation/access rate. The limit comes from trying to avoid throwing random file descriptor limit errors, so I'm not sure what the best solution would be. It'd theoretically be possible to create a queue that would just block client access to a db until there was an active slot available, but that could be easily pushed into starvation if the open db's remain active long enough which could be indefinite with things like continuous replication IIUC. HTH, Paul Davis