You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by gi...@git.apache.org on 2017/08/20 21:26:45 UTC

[GitHub] wohali opened a new pull request #763: Reduce default max_dbs_open to 100

wohali opened a new pull request #763: Reduce default max_dbs_open to 100
URL: https://github.com/apache/couchdb/pull/763
 
 
   With `q=8` being the default shard setting, and the Linux default of
   1024 file handles per process out of the box on virtually every distro,
   the maximum number of databases an unmodified user environment could
   conceivably open simultaneously is 128. (Assuming one view/index per
   database open as well, that number drops to 64.)
   
   When we hit these limits (enfile / emfile Erlang errors) CouchDB starts
   acting very erratically, leading to lots of scary errors and in some
   cases inconsistent databases. We have a recent report of mem3 dying as a
   result, which took the ets tables with it - and this occurred with just
   32 databases, with multiple views . In another case a user reported
   pereceived database corruption (which was actually a combination of
   error reports + app-server layer errors).
   
   While we should recommend ulimit/fs.file-max be bumped in production
   use, and consequently bumping max_dbs_open as well, we should defend
   against these kinds of errors for users who compile and install from
   source (our official distribution option). max_dbs_open = 100 makes this
   kind of error less likely.
   
   This also matches our couchdb-documentation repository, which still
   reflects a setting of 100 and was never updated to match our increased
   500 limit.
   
   The alternate approach is for us to better handle enfile / emfile errors
   and react accordingly, but there are are a significant number of touch
   points in the code where this can cause issues.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services