Skip to content

intercept ssl_read eof error in fetch_updates#329

Open
projecteurlumiere wants to merge 1 commit intoatipugin:masterfrom
projecteurlumiere:ssl_error
Open

intercept ssl_read eof error in fetch_updates#329
projecteurlumiere wants to merge 1 commit intoatipugin:masterfrom
projecteurlumiere:ssl_error

Conversation

@projecteurlumiere
Copy link
Contributor

@projecteurlumiere projecteurlumiere commented Feb 16, 2026

My bot has been encountering the following error once in every couple of days in the production environment:

Faraday::SSLError: SSL_read: unexpected eof while reading

While any API request can encounter this error, it's very annoying with get_updates because it kills the bot right away.

I found out it's possible to configure OpenSSL to ignore unexpected eof errors - see docs for SSL_OP_IGNORE_UNEXPECTED_EOF setting. In the bot's case, however, the next retry always succeeds, so I presume it might be a genuine network error.

Alternatively, this fix might belong at a lower level, not here. Yet, I've been using the most basic setup, and solving this problem turned up to be extremely frustrating as I really wasn't expecting get_updates to shut down like this.

@projecteurlumiere projecteurlumiere force-pushed the ssl_error branch 6 times, most recently from 1b6ea6c to 822f722 Compare February 16, 2026 22:01
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.

1 participant

Comments