Skip to content

[CHA-4943] Retry once on stale keep-alive sockets - #80

Open
itsmeadi wants to merge 1 commit into
masterfrom
cha-stale-keepalive-retry
Open

[CHA-4943] Retry once on stale keep-alive sockets#80
itsmeadi wants to merge 1 commit into
masterfrom
cha-stale-keepalive-retry

Conversation

@itsmeadi

Copy link
Copy Markdown
Collaborator

Ticket

Summary

Follow-up to #78 (idle_timeout 55→25). PrizePicks still hit GetStreamRuby::TransportError on reused keep-alive sockets (SSL_read EOF, Connection reset by peer, Net::ReadTimeout on a closed TCPSocket). Faraday/net_http_persistent does not retry those; Go net/http does for unused idle connections.

Retry the request once, with no backoff, when the failure looks like a dead pooled socket. Applies to POST as well as GET. DNS failures and real read timeouts are not retried. The opt-in retry_config: policy is unchanged.

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

  • Multipart uploads are not retried (they skip Client#request before the retry loop).
  • PrizePicks is still on 8.0.2; this needs a gem release after merge.

Made with Cursor

…4943]

Faraday/net_http_persistent reuses dead sockets and surfaces SSL EOF, RST,
or ReadTimeout-on-closed-socket as TransportError. Match Go net/http by
retrying unused idle connections once with no backoff, including POST.
DNS failures and real read timeouts are not retried.

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