Skip to content

fix: widen happy-eyeballs connect window for ipfs proxy - #22

Merged
erubboli merged 1 commit into
mainfrom
fix/happy-eyeballs-timeout
Oct 12, 2026
Merged

erubboli merged 1 commit into
mainfrom
fix/happy-eyeballs-timeout

Conversation

@erubboli

Copy link
Copy Markdown
Member

Problem

Token icons kept flaking even after the gateway failover and retry fixes. In-container tracing caught connect ETIMEDOUT failures consistently at ~505 ms — far below the 12 s gateway budget. That signature is Node's happy-eyeballs per-address attempt timeout (250 ms default) firing twice: the RTT to the CDN edge from this network is ~300 ms, longer than the per-address window, so a share of connects were being aborted mid-handshake even though the destination was healthy. The proxy then returned 502, token metadata resolved to null, and the UI fell back to letter avatars.

Fix

  • Raise net.setDefaultAutoSelectFamilyAttemptTimeout to 1000 ms in the ipfs proxy module (server-side). Healthy-but-slow connects now survive; genuinely dead addresses still fall through to the next address family.

Verification

  • In-container correlation test: DNS is A-first; failures carried the 2x250 ms signature; with the wider window the same fetch loop succeeds consistently.

@erubboli
erubboli merged commit 9037365 into main Oct 12, 2026
8 checks passed
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