-
Notifications
You must be signed in to change notification settings - Fork 736
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
Beacon API events SSE stream unexpected disconnections #4245
Comments
I think this could be due to the channel filling up, and the stream being terminated by our error handling here: lighthouse/beacon_node/http_api/src/lib.rs Lines 3820 to 3822 in dfcb336
The broadcast receiver will return "lag errors" as described here when the channel fills up:
I think we could map these We could also set some more generous defaults for the channel capacity, which is currently hardcoded at 16 here:
Different capacities for different events would probably make sense, and a way to adjust them via the CLI (maybe an integer multiplier that applies to all channel capacities). |
Implementation of this fix should happen on top of #4462 |
WIP PR for initial testing here: #4500 I haven't been able to get it to produce the |
awesome, thanks. Just built an image. Will roll it out to one of our mainnet sentries and let you know how it looks |
## Issue Addressed Closes #4245 ## Proposed Changes - If an SSE channel fills up, send a comment instead of terminating the stream. - Add a CLI flag for scaling up the SSE buffer: `--http-sse-capacity-multiplier N`. ## Additional Info ~~Blocked on #4462. I haven't rebased on that PR yet for initial testing, because it still needs some more work to handle long-running HTTP threads.~~ - [x] Add CLI flag tests.
## Issue Addressed Closes #4245 ## Proposed Changes - If an SSE channel fills up, send a comment instead of terminating the stream. - Add a CLI flag for scaling up the SSE buffer: `--http-sse-capacity-multiplier N`. ## Additional Info ~~Blocked on #4462. I haven't rebased on that PR yet for initial testing, because it still needs some more work to handle long-running HTTP threads.~~ - [x] Add CLI flag tests.
Closes sigp#4245 - If an SSE channel fills up, send a comment instead of terminating the stream. - Add a CLI flag for scaling up the SSE buffer: `--http-sse-capacity-multiplier N`. ~~Blocked on sigp#4462. I haven't rebased on that PR yet for initial testing, because it still needs some more work to handle long-running HTTP threads.~~ - [x] Add CLI flag tests.
Closes sigp#4245 - If an SSE channel fills up, send a comment instead of terminating the stream. - Add a CLI flag for scaling up the SSE buffer: `--http-sse-capacity-multiplier N`. ~~Blocked on sigp#4462. I haven't rebased on that PR yet for initial testing, because it still needs some more work to handle long-running HTTP threads.~~ - [x] Add CLI flag tests.
Description
When connecting to the
/eth/v1/events
event stream, clients will get unexpected disconnections from the lighthouse beacon node. Especially on theattestation
topic for mainnet while subscribing all subnets.Version
Rust -
1.69.0 (84c898d65 2023-04-16)
unstable
- commit7456e1e8faac7a581705f8e71b0dc4f09a36ee5c
stable
- commit693886b94176faa4cb450f024696cb69cda2fe58
Present Behaviour
To replicate the current behaviour easily connect via curl;
Eventually you'll get disconnected with the libcurl error;
curl: (18) transfer closed with outstanding read data remaining
If you want to speed this up run the beacon node with
--subscribe-all-subnets --import-all-attestations
flags on mainnet to have more attestation events published. With a "fast" machine you will get disconnected multiple times a slot.Expected Behaviour
Should not disconnect unexpectedly.
The text was updated successfully, but these errors were encountered: