n8n Losing Connection to PostgreSQL on Railway After Workflow Changes

prasauo
HOBBY

4 months ago

Hi everyone,

I’m running into an issue with my n8n instance on Railway, where it suddenly lost connection to PostgreSQL after working fine for several hours.

Here’s the context:

  • Setup: n8n hosted on Railway with PostgreSQL as the database (deployed using the default template).

  • What happened: The connection worked perfectly for hours, but after I made some changes to my workflow (no configuration changes), it stopped connecting to PostgreSQL. I haven’t altered any settings like environment variables or database config.

  • Additional detail: I was working on two browser tabs at the time, editing the same workflow. Could this have caused a conflict?

  • Symptoms: n8n can’t connect to the database anymore, and I’m not sure why since it was stable before the workflow edits.

I’ve checked the basics:

  • Environment variables (e.g., DB_TYPE=postgresdb, DB_POSTGRESDB_HOST, etc.) seem correct in Railway.

  • No obvious errors in the workflow changes that should affect the DB connection (just typical node updates).

  • Haven’t dug deep into logs yet—looking for advice on what to check there.

Has anyone seen this before?

Could the two browser tabs have caused a session conflict, or might this be a Railway/PostgreSQL hiccup?

Any tips on what to look for in the logs or steps to fix this would be appreciated!

Thanks in advance!

0 Replies

n8n Losing Connection to PostgreSQL on Railway After Workflow Changes - Railway Help Station