Skip to content

[CHA-4943] Recover from GCP LB TLS half-close EOF - #82

Open
itsmeadi wants to merge 1 commit into
masterfrom
cha-4943-tls-eof
Open

[CHA-4943] Recover from GCP LB TLS half-close EOF#82
itsmeadi wants to merge 1 commit into
masterfrom
cha-4943-tls-eof

Conversation

@itsmeadi

@itsmeadi itsmeadi commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Ticket

Summary

Follow-up to #78 (idle_timeout 55→25). GCP load balancers half-close idle keep-alive TLS without close_notify. OpenSSL 3 makes Net::HTTP's dead-socket probe raise SSL_read: unexpected eof while reading instead of reconnecting, so lowering idle timeout is not enough.

Set OP_IGNORE_UNEXPECTED_EOF so the probe reports a dead socket and reconnects before GET or POST is sent. Restore max_retries=1 (Faraday had forced 0) as a GET/HEAD backstop. Classify that EOF as connection_reset, not tls_handshake_failed.

Previous PR

Checklist

  • The changed code has been covered with unit tests
  • API endpoints are covered with client tests
  • The internal documentation (./docs) has been updated

Notes for review

  • OP_IGNORE_UNEXPECTED_EOF is process-global. Net::HTTP has no per-connection SSLContext options hook. It only relaxes unclean-shutdown detection back to OpenSSL 1.1.1 behavior.
  • Custom http_client: connections skip this (caller owns TLS).
  • Needs a gem release after merge; PrizePicks is still on 8.0.2.

Made with Cursor

OpenSSL 3 makes Net::HTTP's dead-socket probe raise instead of reconnecting.
Tolerate unclean shutdown process-wide and restore Faraday's disabled max_retries.

Co-authored-by: Cursor <cursoragent@cursor.com>
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