On Nov 23, 2009, at 5:41 PM, Paul Davis wrote:
On Mon, Nov 23, 2009 at 5:35 PM, Jeff Macdonald <[email protected]
> wrote:
Hi all,
I have a simple app that is creating a lot of databases. Eventually
when I get to some number of databases, I get this error
all_dbs_active on insert. I thought I just sleep (ick) and try again,
but when I went to Futon after the program was done for many minutes,
I get that error in the web interface too. So I'm rather puzzled at
what to do. I'm sure there is some config var somewhere where I can
up
that limit, but I'm more interested in what the proper thing to do
when such a limit is met.
TIA
--
Jeff Macdonald
Ayer, MA
Other than increase the max_open_dbs configuration option, I can't
think of anything 'elegant' that you could do client side other than
backoff in your script for the db creation/access rate.
The limit comes from trying to avoid throwing random file descriptor
limit errors, so I'm not sure what the best solution would be. It'd
theoretically be possible to create a queue that would just block
client access to a db until there was an active slot available, but
that could be easily pushed into starvation if the open db's remain
active long enough which could be indefinite with things like
continuous replication IIUC.
Yeah, the limit is 100 open dbs at a time. Databases that are being
compacted or having views built will cause the dbs to remain open even
if no clients are actively access the server. Continuous replication
shouldn't keep the dbs open unless it's actively replicatng changes.
You can up the open db limit to whatever you want, but you might have
to boost the open files allowable in the OS settings somewhere.
If you are hitting the limit, but don't have enough clients accessing
the dbs, and have no views being built and no compactions happening,
it might be bug in CouchDB.
-Damien
HTH,
Paul Davis