Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 18386 invoked from network); 16 Jul 2010 00:23:38 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Jul 2010 00:23:38 -0000 Received: (qmail 25286 invoked by uid 500); 16 Jul 2010 00:23:36 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 25236 invoked by uid 500); 16 Jul 2010 00:23:36 -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 25228 invoked by uid 99); 16 Jul 2010 00:23:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Jul 2010 00:23:36 +0000 X-ASF-Spam-Status: No, hits=3.6 required=10.0 tests=FREEMAIL_FROM,FS_REPLICA,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chrisstocktonaz@gmail.com designates 209.85.212.180 as permitted sender) Received: from [209.85.212.180] (HELO mail-px0-f180.google.com) (209.85.212.180) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Jul 2010 00:23:28 +0000 Received: by pxi3 with SMTP id 3so1448432pxi.11 for ; Thu, 15 Jul 2010 17:22:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=tgk+88pZd6WKJ8r5JVtNlckpCmLf/lRRaI7PtJxGJbU=; b=lPLY4rjylUMeglohcNk8QzSXJU3BFF59c3CvCoxMDAImiq7pHEfUkX7l3O/r2tiUzA v6XfNcix/Bu6bbWikOH+H5lLUkBsCVZK7/FtjBlLTJ85wtY8vG1bCMVkLfrlwIkz/wyC 2E6A/n7i0tSf9cG4JCwiqsOuHSn1wbQtsdwoU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=CL3r+6NO0kz7G7NLgh1e8EYzsPQIcmM1D02UAPToDtOii/zVbIftzvXhLM3oywpYQg iszUeXBmPkAmUau9trxSngtxFpnJkVYqPTvxlpBqsBCZrH46h1ze3BP9ZXy887C7NVyx 1lSWRfI6zXSS8cj3jE6ectL2NGepQvgL1/yqs= MIME-Version: 1.0 Received: by 10.142.192.4 with SMTP id p4mr188269wff.311.1279239726696; Thu, 15 Jul 2010 17:22:06 -0700 (PDT) Received: by 10.142.127.18 with HTTP; Thu, 15 Jul 2010 17:22:06 -0700 (PDT) In-Reply-To: References: Date: Thu, 15 Jul 2010 17:22:06 -0700 Message-ID: Subject: Re: Trying to get 5000+ databases replicating, no success thus far. From: Chris Stockton 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 Hello, On Thu, Jul 15, 2010 at 5:02 PM, Randall Leeds wr= ote: > You will want to set max_connections even higher. > If you look in the [replicator] section of the ini you'll notice that > each replication can use up to 10 connections plus the changes feed, > so try bumping max_connections beyond 55,000. > > Finally, what system are you running this on? > For example, on CentOS, the daemon function comes from > /etc/rc.d/init.d/functions and it will call "runuser" to switch to the > couchdb user and pass a "-" in the call, which creates a login shell. > > runuser is much like su. From `info su`: > `-' > `-l' > `--login' > =A0 =A0 Make the shell a login shell. =A0This means the following. =A0Uns= et all > =A0 =A0 environment variables except `TERM', `HOME', and `SHELL' (which > =A0 =A0 are set as described above), and `USER' and `LOGNAME' (which are > =A0 =A0 set, even for the super-user, as described above), and set `PATH' > =A0 =A0 to a compiled-in default value. =A0Change to USER's home director= y. > =A0 =A0 Prepend `-' to the shell's name, intended to make it read its > =A0 =A0 login startup file(s). =A0Additionaly `DISPLAY' and `XAUTHORITY' > =A0 =A0 environment variables are preserved as well for PAM functionality= . > > However, couch still needs to be started from a directory where it can > run "find", i.e. a directory it has permission to read and a non-login > shell won't switch to the users home directory. > > Here's a snippet of my CentOS init script: > > cd $(eval echo ~$COUCHDB_USER) > su $COUCHD_USER -c "$exec \ > =A0 -r $COUCHDB_RESPAWN_TIMEOUT \ > =A0 .... > > Could this be your issue? > > -Randall Hello, This lead me to actually take a look at what the couchdb script was and how it worked, I was thinking it was binary but a quick file and I noticed it was a shell script. I peeked at it and noticed the start_arguments flag, this will service my purpose. For a quick test just to make sure the environmental variables being passed to erlang fix my issue, I changed the following in that script: command=3D"/usr/bin/erl +P 65536 -env ERL_MAX_ETS_TABLES 60000 -env ERL_MAX_PORTS 60000 $interactive_option -sasl errlog_type erro r +K true \ -env ERL_LIBS /var/lib/mysql_data/couchdb-0.11.1-test/lib/couchdb/erlang/lib -couch_ini $start_arguments -s couch" if test "$BACKGROUND" =3D "true" -a "$RECURSED" =3D "false"; then Now I am happily replicating a few thousand db's. Thanks for the helping hands. I will modify my init script accordingly to work with couchdb shell script. Kind Regards, -Chris