On Sun, Feb 8, 2015 at 11:47 PM, Paul Okstad <[email protected]> wrote: > Also, I changed the max open databases in /etc/couchdb/local.ini to 65535. > > Unfortunately, now I am using WAY more CPU than before. Previously CouchDB > was hovering around 3-4% and now it’s about 9-22%. This is on a testbed > system where none of the user databases are being updated by real users. > > I did a file count using this command: > > lsof | grep couchdb | wc > > And I learned that CouchDB has about 27000 files open. > > This doesn’t seem to be a very scalable solution unless I’m missing something > here. Maybe I should be using the update notifications to trigger one time > replications each time a user’s DB is modified?
Max open databases isn't about file descriptors. IIRC, CouchDB opens two descriptors per database: one for read and one for write. Plus there are fd used for view index files and sockets. You'd better setup monitoring for CouchDB stats[1] to keep your hand on the pulse and receive notification when number of used descriptors / open databases getting closer to the limit. System ulimit you can also set to unlimited, so you can avoid unexpectable emfile errors. [1]: As an example of CouchDB monitoring: http://gws.github.io/munin-plugin-couchdb -- ,,,^..^,,,
