incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tommy Chheng <tommy.chh...@gmail.com>
Subject Re: couchdb server connection refused error
Date Mon, 10 Aug 2009 04:55:05 GMT
I found the source of the problem for the connection refused error.

Ubuntu defaults a open file limit of 1024. I had a lot of files opened  
on the system so any new TCP connections could not be created. The  
file limit can be checked with ulimit -n

I raised the limits in the /etc/security/limits.conf file by adding  
these lines:
* soft nofile 32768
* hard nofile 32768

-
Tommy

On Jul 29, 2009, at 2:32 AM, Brian Candler wrote:

> On Sun, Jul 26, 2009 at 10:07:02PM -0700, Tommy Chheng wrote:
>> Any other thoughts why CouchDB would give a connection refused error?
>> I'm doing an ajax call so it's sending 10 requests at a time.
>
> 10 requests concurrently?
>
> I'd have thought that Erlang could pick these up quickly, but there  
> *is* a
> TCP listen queue, which on many systems defaults to 5.
>
> That is, if Erlang were sequentially doing accept - process - accept -
> process ..., you might get this error if there were more than 5  
> outstanding
> requests. It should be easy to test if you write a little _external  
> handler
> which just does a sleep.
>
> The TCP listen queue is tunable at the C level - I don't know if  
> Erlang
> provides a way to set it though.
>
> Regards,
>
> Brian.


Mime
View raw message