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

Rescue OpenSSL::SSL::SSLError for write and write_multi #180

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

ngan
Copy link
Contributor

@ngan ngan commented Mar 15, 2024

While on version 4 of the redis gem, we had a monkey patch to rescue SSL_read: shutdown while in init errors as suggested here: redis/redis-rb#1174 (comment)

This worked fine until we upgrade to redis version 5 and our patch wasn't being applied anymore. We recently have been seeing: SSL_write: shutdown while in init (notice that it's write instead of read). I realized that the redis-client code was rescuing SSL errors for the read: https://github.com/redis-rb/redis-client/blob/master/lib/redis_client/ruby_connection.rb#L102

But it wasn't doing it for write. This PR adds rescuing of OpenSSL::SSL::SSLError to write and write_multi.

@mperham
Copy link

mperham commented Mar 15, 2024

I think this has been affecting a small number of Sidekiq users since 7.0. 🙁 but I’m happy you found it.

@casperisfine casperisfine merged commit 84087cd into redis-rb:master Mar 16, 2024
12 of 13 checks passed
@ngan ngan deleted the retry-write-on-ssl-errors branch March 16, 2024 15:19
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.

None yet

3 participants