cloudant/couch_replicator — pull request #28 by kocolosk (2013-04-26 15:00:24+00:00)
Title: Increase dt between heartbeat and inactive timeouts

The current theory is that on occasion the inactivity timeout in the ibrowse client fires before the replicator receives a heartbeat line. This patch replaces the 5 second delta with the "div 3" logic that results in a 20 second delta by default. This is the logic that we used back when the replicator used heartbeats instead of timeouts to control the frequency of heartbeat lines.

As an aside, the timeout value we're adjusting here actually serves a dual purpose. When a _changes response is streaming this parameter controls the frequency of heartbeat newlines, useful e.g. for highly selective filtered feeds. In between streams of _changes it controls how long the _changes coordinator will wait for updates to the DB before terminating the response with a last_seq entry.

BugzID: 17709