This is really just an issue when using since=now in the changes feed, and no documents change within 10 seconds. If using some previous since value, it's okay, because couchdb sends an immediate response.
I'm curious if it would make sense here to look at the included options (either heartbeat or timeout) and use that value instead of the hard-coded 10000 ms? Obviously I can set heartbeat to 9000ms or so and everything will be fine, but it seems like a longer heartbeat should be allowable? Or is there a reason we should timeout at 10 seconds.
On couchbeam 1.4.2 and CouchDB 2.0, when setting up a changes stream (either using
gen_changes
or by hand), it looks likecouchbeam_changes_stream
will wait at most 10 seconds before exiting withtimeout
(see https://github.com/benoitc/couchbeam/blob/1.4.2/src/couchbeam_changes_stream.erl#L150,TIMEOUT
is defined as 10000).This is really just an issue when using
since=now
in the changes feed, and no documents change within 10 seconds. If using some previoussince
value, it's okay, because couchdb sends an immediate response.I'm curious if it would make sense here to look at the included options (either heartbeat or timeout) and use that value instead of the hard-coded 10000 ms? Obviously I can set heartbeat to 9000ms or so and everything will be fine, but it seems like a longer heartbeat should be allowable? Or is there a reason we should timeout at 10 seconds.