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 87D278A24 for ; Thu, 15 Sep 2011 15:59:47 +0000 (UTC) Received: (qmail 78906 invoked by uid 500); 15 Sep 2011 15:59:45 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 78857 invoked by uid 500); 15 Sep 2011 15:59:45 -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 78848 invoked by uid 99); 15 Sep 2011 15:59:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Sep 2011 15:59:45 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [200.243.80.130] (HELO mail.loop.com.br) (200.243.80.130) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 15 Sep 2011 15:59:39 +0000 Received: (qmail 23705 invoked by uid 64014); 15 Sep 2011 12:59:16 -0300 Received: from 172.17.2.106 (mike@loop.com.br@172.17.2.106) by intranet (envelope-from , uid 64011) with qmail-scanner-2.01st (clamdscan: 0.88/1633. spamassassin: 3.0.3. perlscan: 2.01st. Clear:RC:1(172.17.2.106):. Processed in 0.02593 secs); 15 Sep 2011 15:59:16 -0000 Received: from unknown (HELO ?172.17.2.106?) (mike@loop.com.br@172.17.2.106) by 172.17.3.17 with SMTP; 15 Sep 2011 12:59:16 -0300 Subject: Re: View group compactions shutting down in trunk From: Mike Leddy To: user@couchdb.apache.org Date: Thu, 15 Sep 2011 12:59:15 -0300 In-Reply-To: References: <1315949945.22123.22.camel@mike.loop.com.br> <1316007526.3914.13.camel@mike.loop.com.br> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.0.3- Content-Transfer-Encoding: 7bit Message-ID: <1316102355.3996.6.camel@mike.loop.com.br> Mime-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Thanks, Filipe. I applied the patch and it has resolved the problem for me - I have been running this version since yesterday. Here the view compaction took approx 20 minutes and completed successfully even though database resources were being constantly reclaimed by the lru mechanism. [Thu, 15 Sep 2011 15:11:50 GMT] [info] [<0.30538.35>] View index compaction starting for XXXX-1306368000-1308787199 _design/admin [Thu, 15 Sep 2011 15:30:32 GMT] [info] [<0.30538.35>] View index compaction complete for XXXX-1306368000-1308787199 _design/admin [Thu, 15 Sep 2011 15:31:17 GMT] [info] [<0.30538.35>] Shutting down view group server, monitored db is closing. regards, Mike On Wed, 2011-09-14 at 23:19 -0700, Filipe David Manana wrote: > Mike, I was able to create a test case to reproduce your issue and > validate the last patch. I created an issue in Jira for it: > > https://issues.apache.org/jira/browse/COUCHDB-1283 > > regards, > > On Wed, Sep 14, 2011 at 8:04 AM, Filipe David Manana > wrote: > > Mike, this is the simplest approach I was talking about earlier, in > > case you want to try it: > > > > http://friendpaste.com/1s0In2cLBhWcdsAWEqAw1E > > > > regards, > > > > On Wed, Sep 14, 2011 at 6:54 AM, Filipe David Manana > > wrote: > >> Makes sense Mike. I think the simplest is to make the view compactor keep > >> the database open. > >> I've been thinking in the meanwhile for other approaches however. > >> I'll get back to this soon. > >> > >> Thanks for reporting this and testing > >> > >> On Wednesday, September 14, 2011, Mike Leddy wrote: > >>> > >>> Thanks for the patch Filipe, but I am pretty sure that the compaction > >>> daemon is not involved in this. > >>> > >>> I removed all item in the 'compactions' config and restarted couchdb. > >>> As ?CONFIG_ETS is empty that compact_loop does nothing and > >>> maybe_compact_db is never called. > >>> > >>> Next I started a view compaction in Futon whilst doing the inserts > >>> that cause the constant lru recovery. As expected the result was the > >>> the same: > >>> > >>> "Shutting down view group server, monitored db is closing" in the > >>> log at the same time the view group compaction was shut down. > >>> > >>> I had never seen this before as I had no reason to compact these > >>> large views whilst having so many concurrent accesses on the > >>> smaller databases. > >>> > >>> Regards, > >>> > >>> Mike > >>> > >>> On Tue, 2011-09-13 at 20:53 -0700, Filipe David Manana wrote: > >>>> Mike, > >>>> > >>>> Can you try the following patch? > >>>> > >>>> http://friendpaste.com/2fT5Ne4NAQYoS9CWBsOKUW > >>>> > >>>> Basically it keeps the respective database open until view compaction > >>>> finishes. > >>>> > >>>> Thanks for sharing this > >>>> > >>>> On Tue, Sep 13, 2011 at 2:39 PM, Mike Leddy wrote: > >>>> > Hello, > >>>> > > >>>> > I've been experimenting with trunk and the new compaction daemon, > >>>> > and discovered that some of my larger views were never being fully > >>>> > compacted. > >>>> > > >>>> > Basically I am encountering a large number of these situations: > >>>> > > >>>> > [Tue, 13 Sep 2011 13:24:46 GMT] [info] [<0.173.0>] Shutting down view > >>>> > group server, monitored db is closing. > >>>> > [Tue, 13 Sep 2011 13:24:46 GMT] [error] [<0.155.0>] Compaction daemon - > >>>> > an error ocurred while compacting the view group `base` from database > >>>> > `XXXX-1301529600-1303948799`: shutdown > >>>> > > >>>> > I suspect that since I have a large number of other smaller databases > >>>> > (approx 2500) that are constantly being updated there is a constant > >>>> > stream of databases being closed as a result of least recently used > >>>> > recovery - I currently have max_open_dbs at 500. > >>>> > > >>>> > This does not affect database compaction as a database is never > >>>> > considered idle when compacting. > >>>> > > >>>> > Consequently the larger views are shutdown before completion. Also, > >>>> > when a new attempt to re-compact is processed the partially complete > >>>> > *.compact.view file is truncated. As a result these large views > >>>> > never get fully compacted. > >>>> > > >>>> > If the view group compaction continued where it left off I guess > >>>> > the impact would be minimal. > >>>> > > >>>> > Has anyone else seen this ? > >>>> > > >>>> > Regards, > >>>> > > >>>> > Mike > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > >>>> > >>>> > >>> > >>> > >>> > >> > >> -- > >> Filipe David Manana, > >> > >> "Reasonable men adapt themselves to the world. > >> Unreasonable men adapt the world to themselves. > >> That's why all progress depends on unreasonable men." > >> > >> > > > > > > > > -- > > Filipe David Manana, > > > > "Reasonable men adapt themselves to the world. > > Unreasonable men adapt the world to themselves. > > That's why all progress depends on unreasonable men." > > > > >