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

Add periodic refresh for connection #58

Merged
merged 11 commits into from
May 15, 2024
Merged

Conversation

javiercr
Copy link
Member

@javiercr javiercr commented May 9, 2024

We've observed a number of intermittent errors where the socket connection is closed while trying to send a message (refresh error; please retry in a few minutes).

Until we figure out why that's happening, this should help mitigate those problems by refreshing the connection at a given interval.

Added `refresh_interval_seconds` to Meta's config.
@javiercr javiercr requested a review from tulir May 9, 2024 16:44
example-config.yaml Outdated Show resolved Hide resolved
messagix/client.go Outdated Show resolved Hide resolved
messagix/client.go Outdated Show resolved Hide resolved
… and use `FullReconnect` for force refreshes
@@ -95,6 +95,10 @@ meta:
# HTTP endpoint to request new proxy address from, for dynamically assigned proxies.
# The endpoint must return a JSON body with a string field called proxy_url.
get_proxy_from:
# Minimum interval between full reconnects in seconds, default is 1 hour
min_full_reconnect_interval_seconds: 3600
Copy link
Member Author

@javiercr javiercr May 15, 2024

Choose a reason for hiding this comment

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

I'm exposing MinFullReconnectIntervalSeconds in the config file, as it also affect the interval for force refreshes.

@javiercr javiercr requested a review from tulir May 15, 2024 12:02
user.go Show resolved Hide resolved
@javiercr javiercr requested a review from tulir May 15, 2024 12:19
Copy link
Member

@tulir tulir left a comment

Choose a reason for hiding this comment

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

Looks like it might work now, just a couple small tweaks

user.go Outdated Show resolved Hide resolved
user.go Outdated Show resolved Hide resolved
@javiercr javiercr merged commit 0390840 into main May 15, 2024
11 checks passed
@javiercr javiercr deleted the feature/periodic-refresh branch May 15, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants