4 months ago
Our web service repeatedly fails to connect to the Postgres instance. After adding the dashboard “arrow” link to Postgres-20i6, deployments still fail almost immediately:
ERROR:api.auth:Signup error: connection to server at "postgres.railway.internal" (...), port xxxx failed: Connection refused
[2025-11-11 23:11:22 +0000] [1] [ERROR] Worker (pid:4) was sent SIGKILL! Perhaps out of memory?
The app should be using:
postgresql://postgres:mRSlyFdsqjbsbLbWNqBOqOMWvwJBKROV@postgres-20i6.railway.internal:5432/railway
When we deploy from /backend, Railway builds successfully, but shortly after boot the workers are terminated and /api/auth/signup times out. Direct DB access through the proxy URL (shinkansen.proxy.rlwy.net:58104) works and schema is initialized (6 tables), so Postgres itself is up.
Steps taken:
railway variables --set confirmed DATABASE_URL is correct.
Re-linked web to Postgres-20i6 via dashboard (arrow now shows).
Redeployed (railway up & railway redeploy from /backend).
Initialized schema via proxy (init_railway_schema.py).
Smoke tests still fail; logs continue to show connection refused on the internal hostname.
Impact: /api/auth/signup and /api/auth/login return 500/timeout—auth is down in production.
Could you check the service link or networking between these services? Let me know if you need more logs or a reproduction.
Thanks!
2 Replies
4 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
4 months ago
Hey, can you elaborate further about your services that are trying to access the database via private networking? You have mentioned something regarding initializing the schema, which can only done via the proxy/public networking in your case, this is most likely because the private networking isn't available during build, using the public url or setting a predeployment process does mitigate it.