couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Samuel Newson <>
Subject Re: max_dbs_open and idle db
Date Thu, 26 Jun 2014 09:19:20 GMT
Yes, it does. CouchDB will hold databases open up to the limit of max_dbs_open. If a request
goes to a database not open, then the oldest db is closed to ensure that the total remains
at or below the max_dbs_open setting. So, yes, CouchDB will keep 50,000 databases open at
once with your setting, regardless of whether clients are making requests of them. If you
want fewer databases open at once, lower max_dbs_open.


On 25 Jun 2014, at 19:01, Herman Chan <> wrote:

> A follow up question.
> We have around 90K+ databases on our server.  We used to set max_dbs_open to 100K, our
server was reaching a pretty high memory usage (~90%) of 68GB.  So we decided to half the
max_dbs_open to 50K thinking that not all database is open/access all the time.  Doing that
did take our memory usage down but now that we see there is a lot of opening and closing index
in our log file.  Does that happen when couch is trying to close some db?
> If that's the case, it is surprising for us since when we are listening to the change
feed, only ~2000 dbs is being changed at all time.  Does couch reference to a database even
there is no client attached to it?
> Thanks,
> Herman
> On 24 Jun 2014, at 11:12, Alexander Shorin wrote:
>> Database considered idle by active references to it and by related
>> active operations (like compaction):
>> CouchDB uses LRU cache to manage opened databases and frees idle by demand:
>> leads to:
>> There is nothing need to be configured.
>> --
>> ,,,^..^,,,
>> On Tue, Jun 24, 2014 at 7:01 PM, Herman Chan <> wrote:
>>> Hi there,
>>> In the description of max_db_open, it says "CouchDB reference counts
>>> database accesses internally and will close idle databases when it must."  I
>>> was wondering what's consider idle in couchdb and if the idle time is
>>> configurable?
>>> Herman

View raw message