couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Smith <...@iriscouch.com>
Subject Re: _changes feed continuous mode hangs up after 90 seconds
Date Thu, 23 Jun 2011 02:10:20 GMT
On Thu, Jun 23, 2011 at 9:06 AM, Jason Smith <jhs@iriscouch.com> wrote:
> I suggest the following technique:
>
> 1. Keep track of what `seq` you've seen, perhaps initially 0
> 2. Query _changes, with a heartbeat, and &seen=$seq_Ive_seen
> 3. Set a timer for heartbeat * 1.1, or heartbeat + 5 seconds, or similar
> 4 .Keep a *second* timer, the change deadline. Set this relatively long.
> 5. Every time you receive data, reset the heartbeat timer
> 6. If the heartbeat timer fires, stop your query, go to step 2
> 7. If the deadline timer fires, stop your query, alert a human. Go to
> step 2 (or maybe exit)

Whoops, step 5.5: Every time you receive a change, reset the deadline timer.

-- 
Iris Couch

Mime
View raw message