n8n on Railway degrades after ~24h: “503 Database is not ready!”
tgb-datacamp
HOBBYOP

3 months ago

Hello Railway Support,

I’m running an n8n custom deployment on Railway with a connected Railway Postgres database. Everything works fine immediately after deployment, but the service always degrades within ~24 hours and stops functioning until I redeploy. I've read similar threads but no solution help.

Environment

  • App:n8n-railway-custom

  • n8n version:1.109.2

  • DB: Railway Postgres (same project, Docker image, restarted recently)

  • Region: [insert region if you know it, e.g. us-west2]

Problem Description

  • After redeploy, the service starts normally:

    • n8n initializes, workflows activate, HTTP requests return 200/304 as expected.

  • Within ~24 hours, the service degrades:

    • Deploy logs show:

      503 Database is not ready!
      timeout exceeded when trying to connect
      Failed to hard-delete executions
      
    • HTTP logs:

      • /rest/push continues working (status 0).

      • Other endpoints (e.g. /home/workflows/cta/become-creator) return 503.

  • Redeploying the app restores service, but the cycle repeats daily.

What I’ve Checked

  • DB credentials are correct.

  • No disk/memory/resource alerts on Railway dashboard.

  • Build and deploy succeed cleanly.

  • Issue persists regardless of redeploy.

Question

  • what is the cause?

Any help or guidance to resolve this would be greatly appreciated

$10 Bounty

1 Replies


brody
EMPLOYEE

3 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody 3 months ago


Loading...