Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streaming changes timeout after 10 seconds when "since=now" and no changes occur within 10 seconds #173

Open
jordan0day opened this issue Jul 31, 2017 · 0 comments

Comments

@jordan0day
Copy link

On couchbeam 1.4.2 and CouchDB 2.0, when setting up a changes stream (either using gen_changes or by hand), it looks like couchbeam_changes_stream will wait at most 10 seconds before exiting with timeout (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 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant