New deploys hang on Postgres connect during startup
shayneallan
FREEOP

2 days ago

Every redeploy of an already-successfully-deployed commit hangs during startup and fails the healthcheck. Deploy log stops right after:

INFO: Started server process [1]

INFO: Waiting for application startup.

No further output, no exception - it just sits until the healthcheck (100s timeout) fails and the deploy is marked failed. The exact same commit deployed successfully about 4 hours earlier and is still active and serving traffic now, so this isn't a code issue - it's the same build hanging only on redeploy.

Solved$10 Bounty

Pinned Solution

pm6guy10
FREETop 10% Contributor

a day ago

Perfect! If you don’t mind, please mark accepted so Railway can process the bounty. Thanks!

7 Replies

Railway
BOT

2 days ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway 2 days ago


Did you make any changes to the service configuration? (Eg, start command)


pm6guy10
FREETop 10% Contributor

2 days ago

Since the same commit still works on the old deployment but new containers hang while connecting to Postgres, I’d test the network path rather than extending the healthcheck.

If your Postgres service has Public Networking enabled, temporarily set the new deployment’s DATABASE_URL to ${{Postgres.DATABASE_PUBLIC_URL}} and redeploy.

If it starts normally, you’ve isolated the failure to the private postgres.railway.internal path. Railway has had recent cases where that exact change restored deployments while private networking was failing.

Then you can switch back to ${{Postgres.DATABASE_URL}} once the private path is working again.


0x5b62656e5d

Did you make any changes to the service configuration? (Eg, start command)

shayneallan
FREEOP

2 days ago

No changes to service config.


I assume the healthcheck is stalled due to the application not being able to reach the Postgres database over private network?


pm6guy10

Since the same commit still works on the old deployment but new containers hang while connecting to Postgres, I’d test the network path rather than extending the healthcheck. If your Postgres service has Public Networking enabled, temporarily set the new deployment’s DATABASE_URL to ${{Postgres.DATABASE_PUBLIC_URL}} and redeploy. If it starts normally, you’ve isolated the failure to the private postgres.railway.internal path. Railway has had recent cases where that exact change restored deployments while private networking was failing. Then you can switch back to ${{Postgres.DATABASE_URL}} once the private path is working again.

shayneallan
FREEOP

2 days ago

That was the solution - thanks!!


0x5b62656e5d

I assume the healthcheck is stalled due to the application not being able to reach the Postgres database over private network?

shayneallan
FREEOP

2 days ago

Correct - I ended up re-depoying the Postgres and then the app and it passed. All good now thx.


shayneallan

That was the solution - thanks!!

pm6guy10
FREETop 10% Contributor

a day ago

Perfect! If you don’t mind, please mark accepted so Railway can process the bounty. Thanks!


Status changed to Solved mayori 1 day ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...