Reproducible outbound connection resets to external API from iad region — "Premature close" errors
metamaggi
HOBBYOP

a day ago

Hi there!

We just ran into this error over and over again this morning, tried everything with Claude to try debugging it (approaches tried are listed below). Looks like it's something on your end - wondering if you can help us?

Issue:


Our service makes outbound HTTPS calls to https://api.anthropic.com/v1/messages (a required third-party API for a core product feature). Since today, every one of these calls is failing with:

Invalid response body while trying to fetch https://api.anthropic.com/v1/messages: Premature close

This is a Node.js/undici-level error indicating the TCP connection was closed before the response body was fully received.

What we've ruled out:

  • Not an Anthropic-side outage — their public status page shows all systems operational, and the identical request (same API key, same payload) succeeds immediately (~600ms) when made from a network outside Railway.
  • Not our application code, API key, or model configuration — verified directly.
  • Not DNS/IPv6 routing — api.anthropic.com resolves to a single IPv4 address (160.79.104.10), no IPv6 record exists to cause happy-eyeballs issues.
  • Not a per-container fluke — we've reproduced this on every fresh container today: 3 separate deploys and 1 manual railway restart, all failing identically on their first outbound call to this host, immediately after boot.
  • Not a lack of retries — we added client-side retries (5 attempts with exponential backoff) and a dedicated startup "warm-up" request; the warm-up itself fails with the same error on every boot.

Ask:


Given this reproduces on every fresh container in our service but not from outside Railway's network, can you check whether there's a known issue with outbound connectivity/egress from the iad region to api.anthropic.com (IP 160.79.104.10, port 443)?

Happy to provide additional logs, timestamps.

Thanks!!

Maggi

$20 Bounty

4 Replies

Railway
BOT

a day ago

This thread has been opened as a public bounty so the community can help solve it. The thread and any further activity are now visible to everyone.

Status changed to Open Railway 1 day ago


metamaggi
HOBBYOP

a day ago

Hi Railway team — this thread was originally submitted as a private support request because it contains identifiers for our production project, services, and deployment. While these aren't credentials, we'd prefer not to publish details about our production infrastructure. Could you please move this thread back to private? Thank you.


a day ago

Apologies, we are not ale to help with issues unrelated to the Railway platform or product. This thread will reman a public community thread. Feel free to edit your post content.


This is known nodejs issue and has been patched, you can fix it by updating your node version to 24.18 or newer


mayori

This is known nodejs issue and has been patched, you can fix it by updating your node version to `24.18` or newer

metamaggi
HOBBYOP

4 hours ago

Thank youuuu @mayori! We pushed to Node 24.18.0 and it's fixed! This was causing us quite some time to debug, so really appreciate this.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...