couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: Error after creating hundred of views
Date Wed, 11 Jul 2012 13:50:16 GMT
Firstly, are you sure you increased file descriptor max? If, on debian or ubuntu, you simply
tweaked /etc/security/limits.conf then you did not make the change. By default, PAM does not
consult that file for processes that 'su' to a user as the couchdb startup scripts do. Look
in /etc/pam.d/su and you'll see the limits.so line is commented out.

Secondly, couchdb maintains an LRU and closes databases (and their file descriptors) to stay
under that limit.

B.


On 11 Jul 2012, at 01:15, João Ramos wrote:

> Something is still not right. I increased the filedescriptors to 4096 and
> the same thing keeps happening.
> 
> I restarted Couchdb, and used _stats to check how many filedescriptors were
> open: about 10, so I proceeded in creating 1000 design docs and
> the filedescriptors count went up to about 1000. I inserted another 1000
> three more times and the count went up as excepted at around 4056. Then I
> queried those views (each design docs has only one view) and everything was
> fine. The 4000 queries were fast. To make sure I did them again and still
> no problem. Then I tried to insert another 1000 designs docs and the error
> started showing up. I couldn't use the database for anything anymore.
> 
> Then I decided to compact the database and the filedescriptors returned
> back to about 10. So far so good, so I started querying 1000 views and the
> count went up again. I managed to call up until 4000 different views until
> the error reappeared.
> 
> Does Couchdb ever closes the filedescriptors? Does limit on the number
> of filedescriptors somehow influences the maximum number of design docs /
> views a database can have?
> 
> On Mon, Jul 9, 2012 at 9:25 PM, Niels Boldt <nielsboldt@gmail.com> wrote:
> 
>> Hi
>> 
>> emfile means you run out of filedescriptors
>> 
>> See  http://wiki.apache.org/couchdb/Performance#Resource_Limits for
>> further
>> information in increasing this limit
>> 
>> Best Regards
>> Niels
>> 
>> On Mon, Jul 9, 2012 at 8:01 PM, João Ramos <joao.sigma@gmail.com> wrote:
>> 
>>> I have a script that creates several hundred of views.
>>> At about 700, I start getting several errors and I've attached the log
>>> output of them.
>>> 
>>> Thanks in advance.
>>> 
>> 
>> 
>> 
>> --
>> BinaryConstructors ApS
>> Vestergade 10a, 4th
>> 1456 Kbh K
>> Denmark
>> phone: +4529722259
>> web: http://www.binaryconstructors.dk
>> mail: nb@binaryconstructors.dk
>> skype: nielsboldt
>> 


Mime
View raw message