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):
https://github.com/apache/couchdb/blob/master/src/couchdb/couch_db.erl#L1115
CouchDB uses LRU cache to manage opened databases and frees idle by
demand:
https://github.com/apache/couchdb/blob/master/src/couchdb/couch_server.erl#L490
leads to:
https://github.com/apache/couchdb/blob/master/src/couchdb/couch_server.erl#L261
There is nothing need to be configured.
--
,,,^..^,,,
On Tue, Jun 24, 2014 at 7:01 PM, Herman Chan <[email protected]>
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