couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Stockton <>
Subject Re: [long] multiple couchdb invocations, single machine
Date Sat, 24 Oct 2009 02:25:33 GMT
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:


  Multiple couchdb invocations on a single machine are not
  behaving as I would expect to isolate databases.

  Does someone have a tested configuration they will share ?


 I have installed

  couchdb - Apache CouchDB 0.11.0b828784

 and am trying to do what I thought would be simple.

 Run two independent invocations of couchdb on the same machine.
 With the expectation that by running separate invocations, I
 could keep respective databases isolated from each.

 Here's what I want

 * one invocation on default port 5984   (let's call this one PAT)
 * other invocation on non-default port 5985 (let's call this one MIKE)
 * PAT should not see or have access to MIKE databases
 * MIKE should not see or have access to PAT databases
 * PAT can hang with no effect on MIKE
 * MIKE can hang and have no effect on PAT
 * long running events on either have no effect on the other

 Here's what I tried (all pertinent directories and files are created with
 rw permissions to invoking user).  default.ini is as created by couchdb

 Added the following to /usr/local/etc/couchdb/local.ini


database_dir   = /usr/local/var/lib/couchdb_pat
view_index_dir = /usr/local/var/lib/couchdb_pat

file = /home/erl/couchdb/logs/couch_pat.log
level = info

 Added the following to  /usr/local/etc/couchdb/mike/local_mike.ini

database_dir   = /usr/local/var/lib/couchdb_mike
view_index_dir = /usr/local/var/lib/couchdb_mike

file = /home/erl/couchdb/logs/couch_mike.log
level = info

port = 5985

 start PAT with
couchdb  -b  -p  /usr/local/var/run/        \
            -o  /home/erl/couchdb/logs/couchdb_pat.stdout \
            -e  /home/erl/couchdb/logs/couchdb_pat.stderr

 start MIKE with
couchdb  -b  -p  /usr/local/var/run/        \
            -a  /usr/local/etc/couchdb/mike/local_mike.ini \
            -o /home/erl/couchdb/logs/couchdb_mike.stdout  \
            -e /home/erl/couchdb/logs/couchdb_mike.stderr

 NOW, in Futon, for PAT http://localhost:5984/_utils/config.html

  database_dir       /usr/local/var/lib/couchdb
  database_dir       /usr/local/var/lib/couchdb_pat
  view_index_dir     /usr/local/var/lib/couchdb_pat

 AND, for MIKE http://localhost:5985/_utils/config.html

  database_dir       /usr/local/var/lib/couchdb
  database_dir       /usr/local/var/lib/couchdb_pat
  view_index_dir     /usr/local/var/lib/couchdb_pat

 BUT ... both show all the databases already existing in the default
 /usr/local/var/lib/couchdb directory.


 If I create a new database from either PAT or MIKE URI

 the new database winds up in the /usr/local/var/lib/couchdb
 directory (and, as previously mentioned, either invocation
 of couchdb can see all of the databases there).

 If I comment out database_dir and view_index_dir in default.ini
 then both invocations see the databases (in Futon Overview) as,


 Although each Futon Configuration shows only the respective
 database_dir    /usr/local/var/lib/couchdb_pat
 view_index_dir  /usr/local/var/lib/couchdb_pat

 database_dir    /usr/local/var/lib/couchdb_mike
 view_index_dir  /usr/local/var/lib/couchdb_mike

 Logs are getting written per respective PAT and MIKE local ini files.


 How do I run more than one invocation of couchdb on a single machine
 with database and process isolation ?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message