Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DCE211CD0 for ; Fri, 22 Apr 2011 14:31:10 +0000 (UTC) Received: (qmail 66799 invoked by uid 500); 22 Apr 2011 14:31:09 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 66765 invoked by uid 500); 22 Apr 2011 14:31:09 -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 66757 invoked by uid 99); 22 Apr 2011 14:31:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Apr 2011 14:31:09 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jon@core-apps.com designates 209.85.161.52 as permitted sender) Received: from [209.85.161.52] (HELO mail-fx0-f52.google.com) (209.85.161.52) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Apr 2011 14:31:03 +0000 Received: by fxm6 with SMTP id 6so639980fxm.11 for ; Fri, 22 Apr 2011 07:30:42 -0700 (PDT) Received: by 10.223.14.207 with SMTP id h15mr185458faa.50.1303482642889; Fri, 22 Apr 2011 07:30:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.122.129 with HTTP; Fri, 22 Apr 2011 07:30:14 -0700 (PDT) In-Reply-To: References: From: Jonathan Johnson Date: Fri, 22 Apr 2011 09:30:14 -0500 Message-ID: Subject: Re: all_dbs_active error, not sure how to "fix" To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org By doing that, it will increase the number of possible open files (although I admit I'm significantly lower than my current limit). My point is that I'm never actively connecting to 130 databases, so why is couch keeping them open? Shouldn't it recycle databases that hadn't been connected to recently? -Jon On Fri, Apr 22, 2011 at 9:05 AM, Filipe David Manana wrote: > Look at the "max_dbs_open" configuration parameter in the .ini files > and increase it to a higher value. > > On Fri, Apr 22, 2011 at 3:01 PM, Jonathan Johnson wro= te: >> I'm running couchdb 1.0.2 on CentOS 5.5. The databases are on an ext4 >> formatted drive. >> >> I have 209 databases, but they're never truly active at the same time. >> Our stack is written in ruby. The web layer switches between active >> databases depending on the url. However, we have 16 web processes, so >> in theory the maximum number of truly active databases is 16. >> >> We also have a daemon process that loops through a chunk of the >> databases periodically. However, it's one thread, and as such also >> only truly works with one database at a time. >> >> My understanding is that CouchRest doesn't keep HTTP connections alive >> for multiple requests, but I don't know that for sure. I have even >> gone as far as putting in manual garbage collection calls in my daemon >> to ensure that any stranded connection objects will be collected. >> >> With all of that, however, I eventually get into a state where I get >> the all_dbs_active error. It doesn't happen often -- last time was >> nearly 3 weeks ago. However, once it gets in the state, restarting all >> of my clients doesn't release the databases. The only way to recover >> is to restart couch. >> >> open_os_files was at 2308 before I restarted it this morning, which is >> less than the current limit set (4096). >> >> I guess I feel like this is an issue inside of couch because even if I >> quit all of my active server processes that connect to couch, couch >> never frees up the open databases. I can hit it one-off from my >> browser and still get the error, even though I'm the only active >> connection. >> >> Has anyone else seen this? Any ideas of what I can try to prevent this >> from happening? >> >> Thanks! >> -Jon >> > > > > -- > Filipe David Manana, > fdmanana@gmail.com, fdmanana@apache.org > > "Reasonable men adapt themselves to the world. > =A0Unreasonable men adapt the world to themselves. > =A0That's why all progress depends on unreasonable men." >