Intermittent ETIMEDOUT errors connecting to Meta WhatsApp API from Railway container
ebuntario
HOBBYOP

2 months ago

Hi Railway Support,

I'm experiencing intermittent connection timeouts when my Next.js application (running on Railway) attempts to connect to Meta's WhatsApp Business API (graph.facebook.com).

Environment:

  • Service: Next.js 16.1.0 (Node.js)

  • Project ID: 1a6af0e6-b1c1-4b1c-a1da-598363eef2fc

  • Service ID: 72fc29a9-3d40-4e3f-aeb4-103e85616967

  • Deployment ID: 41ca06f7-9fd9-4026-8878-5ef9a2487408

Issue: Outbound HTTPS requests to Meta's WhatsApp API (graph.facebook.com, IP 157.240.245.13:443) are intermittently timing out with ETIMEDOUT. Additionally, IPv6 connections show ENETUNREACH.

Error Details:

connect ETIMEDOUT 157.240.245.13:443

connect ENETUNREACH 2a03:2880:f07e:e:face:b00c:0:2:443 - Local (:::0)

Behavior:

  • Some requests succeed on first attempt

  • Some requests require 2-3 retries before succeeding

  • Some requests fail completely after 4 retry attempts (~6 seconds total)

  • This is happening sporadically, not consistently

Timestamp of failures: 2025-12-29 ~13:24-13:25 UTC

Questions:

  1. Are there known network routing issues between Railway and Meta's infrastructure?

  2. Is IPv6 properly configured for outbound connections in my region?

  3. Would switching to a different Railway region potentially improve connectivity to Meta's servers?

I've implemented retry logic with exponential backoff, but the timeouts are still causing message delivery failures. Any insights into the network path or recommendations would be appreciated.

Thanks!

p.s.
This appears to be related to a known issue:

https://station.railway.com/questions/etimedout-connecting-to-graph-facebook-c-a4806595

I'm experiencing intermittent (not 100%) ETIMEDOUT errors to Meta's

WhatsApp API from what I believe is the Asia Southeast region.

Solved

1 Replies

sarahkb125
EMPLOYEE

2 months ago

Hi there,

IPv6 connections will hit ENETUNREACH errors on Railway since we don't currently support outbound IPv6. The best workaround is to configure your HTTP client to prefer IPv4—in Node.js, you can set the family option to 4 in your request config or use DNS resolution that favors IPv4.

For the intermittent ETIMEDOUT errors to Meta's infrastructure over IPv4, that's trickier to pin down. There is no known issue with Meta's infrastructure at this time.

Best, The Railway Team


Status changed to Awaiting User Response Railway 2 months ago


Railway
BOT

2 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 2 months ago


Loading...