incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Stockton <chrisstockto...@gmail.com>
Subject Re: Trying to get 5000+ databases replicating, no success thus far.
Date Fri, 16 Jul 2010 00:22:06 GMT
Hello,

On Thu, Jul 15, 2010 at 5:02 PM, Randall Leeds <randall.leeds@gmail.com> wrote:
> 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'
>     Make the shell a login shell.  This means the following.  Unset all
>     environment variables except `TERM', `HOME', and `SHELL' (which
>     are set as described above), and `USER' and `LOGNAME' (which are
>     set, even for the super-user, as described above), and set `PATH'
>     to a compiled-in default value.  Change to USER's home directory.
>     Prepend `-' to the shell's name, intended to make it read its
>     login startup file(s).  Additionaly `DISPLAY' and `XAUTHORITY'
>     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 \
>   -r $COUCHDB_RESPAWN_TIMEOUT \
>   ....
>
> 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="/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" = "true" -a "$RECURSED" = "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

Mime
View raw message