-
Notifications
You must be signed in to change notification settings - Fork 668
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
feat: make the timeout for event observers configurable #5286
Conversation
@obycode Would it be better to err on the side of flexibility and change the default to something larger that wouldn't likely cause issues syncing a large block to a low-powered observer, like an API with minimal resources? |
Yeah, that could make sense. I chose 1s as the default since that what it was hard-coded to before this change, so this change would have no effect. The other problem with defaulting to 60s is that that could be surprising, since it halts progression of a node, a 60s timeout before seeing any logs is a lot, given that blocks will be coming in on the order of seconds. |
for what it's worth, confirmed that this change does allow genesis sync with the API (moved past block 0) |
I agree, but I think that says more about the logging from when a timeout is reached rather than the default setting itself. If the log when an observer timeout is specific, like "timeout reached (60s) trying to send block 12345 to observer my.domain.com:3999", it wouldn't be very confusing to debug. Not suggesting this is needed now, but just thinking it would pose less consternation to set a wide boundary now and come back to it later with improved logging, rather than set a narrow boundary now and cause many operators to update all of their configs since 1s is likely too low for many people, and JW has already seen payloads take close to 30 seconds. |
@obycode timeout_ms doesn't work with 3.0.0.0.0 for some reason and I keep getting this error with Nakamoto Testnet nodes
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Adds an optional
timeout_ms
to the configuration for event observers, allowing users to set a unique timeout for each observer.Checklist
docs/rpc/openapi.yaml
andrpc-endpoints.md
for v2 endpoints,event-dispatcher.md
for new events)clarity-benchmarking
repobitcoin-tests.yml