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

Bump websocket connect timeout #382

Closed
wants to merge 1 commit into from
Closed

Bump websocket connect timeout #382

wants to merge 1 commit into from

Conversation

akuzni2
Copy link
Collaborator

@akuzni2 akuzni2 commented Jan 27, 2025

We need to be able to adjust the timeout level to be longer if some EA's are under heavy load we can still connect without doing multiple re-attempts

Copy link
Contributor

github-actions bot commented Jan 27, 2025

NPM Publishing labels 🏷️

🟢 This PR has valid version labels and will cause a patch bump.

@@ -157,7 +157,7 @@ export class WebSocketTransport<
return {
// Called when the WS connection is opened
open: async (event: WebSocket.Event) => {
logger.debug(`Opened websocket connection. (event type ${event.type})`)
logger.info(`Opened websocket connection. (event type ${event.type})`)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an important type of event that is good to set at info level since it should be infrequent and manages the entire stream of data

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are certain EAs (eg: coinmetrics) that require reconnection to change the subscription set. I'm not sure this is the correct approach. Maybe in the specific EA if you find this valuable to log at info, stick a separate log in the specific open handler?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good suggestion - will implement locally

@@ -246,7 +246,7 @@ export const BaseSettingsDefinition = {
'The maximum amount of time in milliseconds to wait for the websocket connection to open (including custom open handler)',
type: 'number',
default: 10_000,
validate: validator.integer({ min: 500, max: 30_000 }),
validate: validator.integer({ min: 500, max: 180000 }),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not opposed to this per se, but also not sure this is correct, discussion: https://chainlink-core.slack.com/archives/C02FM5ZP2TC/p1738019106947369

@akuzni2 akuzni2 closed this Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants