15 days ago
Can someone please help with the following recurring issue i am having.
Issue: Node.js/Express container starts then stops after ~16 seconds — no error logged
Stack: Node.js/Express, Supabase (external Postgres), JWT auth, Resend, Anthropic API
Project ID: aaf9fef8-c980-4972-a9b7-5c4444b2054f
Service ID: 1dbbaff2-4397-425c-9cb4-ce9173f1b714
Domain: program-pal-production.up.railway.app
Log pattern (repeating):
Starting Container
injected env (0) from ../.env
Server running on port 8080
Stopping Container ← ~16 seconds after start, no error
What I've ruled out:
• Target port is correctly set to 8080
• All 8 environment variables are present
• App binds to port 8080 successfully
• app.set('trust proxy', 1) is set
• Rolled back to a previously working deployment — same result
• Redeployed latest commit — same result
• Cleared build cache — no change
• Restarted deployment — no change
What it looks like:
Railway appears to be stopping the container deliberately (~16s is consistent with a health check timeout). However the service shows ACTIVE with 1 replica in the dashboard despite being unreachable. No healthcheck path is configured.
This issue started may 5th, resolved hours later, and has recurred this morning again (may 8th) No code or config changes were made that would explain it. Suspect a platform-level routing/networking issue specific to this service preventing Railway's health check from reaching the container.
11 Replies
15 days ago
The currently active service has been online for a few hours and is reachable over its public domain.
So I am curious where you are getting the 16s thing from and why you think it's unreachable.
Hi Brody,
Here's the browser console error I am receiving.
Failed to load resource: net::ERR_CONNECTION_CLOSED
This is happening on every API request. The connection is accepted but closed before any response is returned — suggesting the edge proxy is dropping requests before they reach the container. I think this is a network-level failure, not an application error.
15 days ago
Can you give me an example curl?
Hi Brody, here is the curl output:
- Host program-pal-production.up.railway.app:443 was resolved.
- IPv4: 203.96.208.40
- Trying 203.96.208.40:443...
- schannel: failed to receive handshake, SSL/TLS connection failed
- closing connection #0 curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed
DNS resolves correctly and TCP connects to 203.96.208.40, but the SSL/TLS handshake never completes. This appears to be a TLS termination issue on Railway's side for this specific domain — nothing in my app or config can cause this. Is there a certificate issue with program-pal-production.up.railway.app?
15 days ago
I'm asking for a curl command.
15 days ago
Attachments
curl -v https://program-pal-production.up.railway.app/api/auth/login -H "Content-Type: application/json" -d '{"email":"test@example.com","password":"testpassword"}'
I tried accessing via a VPN and had no issues logging in. So it must be something to do with the New Zealand APAC edge node 203.96.208.40 has broken TLS?
15 days ago
I connected via a VPN in Singapore so I would hit the Asia edge, and I got back invalid credentials, but the connection worked fine, so this must be a networking issue on your end.
15 days ago
Will disengage now and leave this to the community.
Status changed to Solved brody • 14 days ago