From user-return-7053-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Sat Oct 24 03:44:51 2009 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 79709 invoked from network); 24 Oct 2009 03:44:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Oct 2009 03:44:51 -0000 Received: (qmail 74326 invoked by uid 500); 24 Oct 2009 03:44:50 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 74212 invoked by uid 500); 24 Oct 2009 03:44:50 -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 74201 invoked by uid 99); 24 Oct 2009 03:44:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Oct 2009 03:44:49 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jchris@gmail.com designates 209.85.216.202 as permitted sender) Received: from [209.85.216.202] (HELO mail-px0-f202.google.com) (209.85.216.202) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Oct 2009 03:44:45 +0000 Received: by pxi40 with SMTP id 40so792598pxi.13 for ; Fri, 23 Oct 2009 20:44:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=pFTXU3GpVbOfAPsLl4FOvd3SnlVN+cjEU5XiXNxBbg0=; b=hbk7CMhMCkdfxz4p3fleCxNkoxOQLPdtlrCObdSgOGxk+bddOHiHcutw30mJEdFRBM D1Xu9lJZymQftk1WuLFsZ9NCkh2ukS3/FoBt9yPuVpeg9FR/eqAaTYjqrtX0dvEEeUSL FctnRkmjovup1jTktLsu5W0fvGZ2/4cF8F3/0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=Lpz8R/V7UlCuJZilqlvTHaEX5Fz3Qmf75C0lH7xoehuRttzQHie6RFCQ9ljCqSB+oz EcmULUa77Lp8njYxRVcZgfBgNDIGJcLAOD8C4TxxFNohndiVs3TB7SXngJo2XB41U2dk t/ZfYrx/Hx9bAuMv/5BXGJ2TBtfnoiX01DEk0= MIME-Version: 1.0 Sender: jchris@gmail.com Received: by 10.143.136.2 with SMTP id o2mr888648wfn.330.1256355864916; Fri, 23 Oct 2009 20:44:24 -0700 (PDT) In-Reply-To: References: <20091024011927.GC3633@delora.autosys.us> Date: Fri, 23 Oct 2009 20:44:24 -0700 X-Google-Sender-Auth: c9e0a7dce174a2c6 Message-ID: Subject: Re: [long] multiple couchdb invocations, single machine From: Chris Anderson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Fri, Oct 23, 2009 at 7:42 PM, Paul Davis w= rote: > You could also set the log level to debug and start each without -b to > see what config files are being read. > We have this use case working for couch.io's hosting, but we haven't upgraded to 0.11. Anyway, it's been known to work in the past. Keep digging and we'll help. Chris > Paul Davis > > On Fri, Oct 23, 2009 at 10:25 PM, Chris Stockton > wrote: >> I would try starting them with strace -f and see what ini files they are >> reading and look for other clues. >> >> On Oct 23, 2009 6:19 PM, "Michael McDaniel" wrote: >> >> >> =A0SHORT VERSION: >> >> =A0Multiple couchdb invocations on a single machine are not >> =A0behaving as I would expect to isolate databases. >> >> =A0Does someone have a tested configuration they will share ? >> >> >> >> =A0LONG VERSION: >> >> =A0I have installed >> >> =A0couchdb - Apache CouchDB 0.11.0b828784 >> >> =A0and am trying to do what I thought would be simple. >> >> =A0Run two independent invocations of couchdb on the same machine. >> =A0With the expectation that by running separate invocations, I >> =A0could keep respective databases isolated from each. >> >> >> =A0Here's what I want >> >> =A0* one invocation on default port 5984 =A0 (let's call this one PAT) >> =A0* other invocation on non-default port 5985 (let's call this one MIKE= ) >> =A0* PAT should not see or have access to MIKE databases >> =A0* MIKE should not see or have access to PAT databases >> =A0* PAT can hang with no effect on MIKE >> =A0* MIKE can hang and have no effect on PAT >> =A0* long running events on either have no effect on the other >> >> =A0Here's what I tried (all pertinent directories and files are created = with >> =A0rw permissions to invoking user). =A0default.ini is as created by cou= chdb >> =A0build/install. >> --- >> >> =A0Added the following to /usr/local/etc/couchdb/local.ini >> >> [couchdb] >> >> database_dir =A0 =3D /usr/local/var/lib/couchdb_pat >> view_index_dir =3D /usr/local/var/lib/couchdb_pat >> >> [log] >> file =3D /home/erl/couchdb/logs/couch_pat.log >> level =3D info >> --- >> >> =A0Added the following to =A0/usr/local/etc/couchdb/mike/local_mike.ini >> >> [couchdb] >> database_dir =A0 =3D /usr/local/var/lib/couchdb_mike >> view_index_dir =3D /usr/local/var/lib/couchdb_mike >> >> >> [log] >> file =3D /home/erl/couchdb/logs/couch_mike.log >> level =3D info >> >> [httpd] >> port =3D 5985 >> --- >> >> =A0start PAT with >> couchdb =A0-b =A0-p =A0/usr/local/var/run/couchdb_pat.pid =A0 =A0 =A0 = =A0\ >> =A0 =A0 =A0 =A0 =A0 =A0-o =A0/home/erl/couchdb/logs/couchdb_pat.stdout \ >> =A0 =A0 =A0 =A0 =A0 =A0-e =A0/home/erl/couchdb/logs/couchdb_pat.stderr >> --- >> >> =A0start MIKE with >> couchdb =A0-b =A0-p =A0/usr/local/var/run/couchdb_mike.pid =A0 =A0 =A0 = =A0\ >> =A0 =A0 =A0 =A0 =A0 =A0-a =A0/usr/local/etc/couchdb/mike/local_mike.ini = \ >> =A0 =A0 =A0 =A0 =A0 =A0-o /home/erl/couchdb/logs/couchdb_mike.stdout =A0= \ >> =A0 =A0 =A0 =A0 =A0 =A0-e /home/erl/couchdb/logs/couchdb_mike.stderr >> --- >> >> >> =A0NOW, in Futon, for PAT http://localhost:5984/_utils/config.html >> >> >> =A0database_dir =A0 =A0 =A0 /usr/local/var/lib/couchdb >> =A0database_dir =A0 =A0 =A0 /usr/local/var/lib/couchdb_pat >> =A0view_index_dir =A0 =A0 /usr/local/var/lib/couchdb_pat >> >> =A0AND, for MIKE http://localhost:5985/_utils/config.html >> >> =A0database_dir =A0 =A0 =A0 /usr/local/var/lib/couchdb >> =A0database_dir =A0 =A0 =A0 /usr/local/var/lib/couchdb_pat >> =A0view_index_dir =A0 =A0 /usr/local/var/lib/couchdb_pat >> >> >> =A0BUT ... both show all the databases already existing in the default >> =A0/usr/local/var/lib/couchdb directory. >> >> >> =A0AND >> >> =A0If I create a new database from either PAT or MIKE URI >> =A0http://localhost:5984/_utils/index.html >> =A0http://localhost:5985/_utils/index.html >> >> =A0the new database winds up in the /usr/local/var/lib/couchdb >> =A0directory (and, as previously mentioned, either invocation >> =A0of couchdb can see all of the databases there). >> >> >> =A0If I comment out database_dir and view_index_dir in default.ini >> =A0then both invocations see the databases (in Futon Overview) as, >> =A0e.g. >> >> =A0 couchdb/foo_db >> =A0 couchdb/bar_db >> >> =A0Although each Futon Configuration shows only the respective >> =A0database_dir =A0 =A0/usr/local/var/lib/couchdb_pat >> =A0view_index_dir =A0/usr/local/var/lib/couchdb_pat >> >> =A0database_dir =A0 =A0/usr/local/var/lib/couchdb_mike >> =A0view_index_dir =A0/usr/local/var/lib/couchdb_mike >> =A0. >> >> >> =A0Logs are getting written per respective PAT and MIKE local ini files. >> >> >> =A0QUESTION: >> >> =A0How do I run more than one invocation of couchdb on a single machine >> =A0with database and process isolation ? >> >> >> ~Michael >> > --=20 Chris Anderson http://jchrisa.net http://couch.io