incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: Replication hangs
Date Mon, 19 Oct 2009 14:47:55 GMT
> So, until JIRA comes back online I'll follow up with that here.  I think I
> could see how repeated pull replications in rapid succession could end up
> blowing through sockets.  Each pull replication sets up one new connection
> for the _changes feed, and tears it down at the end (everything else
> replication-related goes through a connection pool).  Do enough of those
> very short requests and you could end up with lots of connections in
> TIME_WAIT and eventually run out of sockets.  FWIW, the default Erlang limit
> is slightly less than 1024.  If your update_notification process uses a new
> connection for every POST to _replicate you'll hit the system limit (also
> 1024 in Ubuntu IIRC) twice as fast.

A quick way to test this is try and hop on a machine just after it
gets wedged and look at the output of:

$ sudo netstat -tap tcp

If you see a whole bunch of sockets in TIME_WAIT then this is probably
your error.

Paul Davis

Mime
View raw message