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

Quick exit on redis connection error after interrupt #292

Merged
merged 1 commit into from
Apr 24, 2023

Conversation

ikreymer
Copy link
Member

@ikreymer ikreymer commented Apr 20, 2023

Optimization for Browsertrix Cloud: often if the crawler and redis pods are being shutdown together, and redis exits quickly while crawler may attempt to finish current work and reconnect to redis.
If redis connection disappears after interrupt signal is received (and still there after the REDIS_ERROR_LOG_INTERVAL_SECS), assume redis has been shutdown and crawler also should exit immediately.
This results is faster shutdown times when crawl is being canceled.

…ection is gone, assume crawler is being terminated and exit quickly,

don't attemtpt to reconnect to redis (assume crawler is also being shutdown)
@ikreymer ikreymer requested a review from tw4l April 20, 2023 01:15
@ikreymer ikreymer merged commit 3c7c7bf into main Apr 24, 2023
@ikreymer ikreymer deleted the exit-after-redis-disconnect-on-interrupt branch May 1, 2023 00:38
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

Successfully merging this pull request may close these issues.

2 participants