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.