n8n crash

Anonymous
HOBBY

2 months ago

I experience constant crashes from n8n, I don't understand what this log mean. Can you help me with it?

Connection terminated due to connection timeout

May 20 13:24:00

Worker

Connection terminated unexpectedly

May 20 13:24:09

Primary

There was an error initializing DB

May 20 13:24:09

Primary

at Object.init (/usr/local/lib/node_modules/n8n/dist/db.js:57:21)

May 20 13:24:09

Primary

at processTicksAndRejections (node:internal/process/task_queues:95:5)

May 20 13:24:09

Primary

at Start.init (/usr/local/lib/node_modules/n8n/dist/commands/base-command.js:119:9)

May 20 13:24:09

Primary

at Start.init (/usr/local/lib/node_modules/n8n/dist/commands/start.js:165:9)

May 20 13:24:09

Primary

at run (/usr/local/lib/node_modules/n8n/node_modules/@oclif/core/lib/main.js:94:16)

May 20 13:24:09

Primary

at /usr/local/lib/node_modules/n8n/bin/n8n:70:2

May 20 13:24:09

Primary

Connection terminated due to connection timeout

May 20 13:24:09

Primary

Connection terminated unexpectedly

May 20 13:24:09

Primary

User settings loaded from: /home/node/.n8n/config

May 20 13:24:09

Primary

Last session crashed

May 20 13:24:15

Primary

Initializing n8n process

May 20 13:24:30

Worker

There was an error initializing DB

May 20 13:24:30

Worker

Error: Could not establish database connection within the configured timeout of 20,000 ms. Please ensure the database is configured correctly and the server is reachable. You can increase the timeout by setting the 'DB_POSTGRESDB_CONNECTION_TIMEOUT' environment variable.

May 20 13:24:30

Worker

at Object.init (/usr/local/lib/node_modules/n8n/dist/db.js:57:21)

May 20 13:24:30

Worker

at processTicksAndRejections (node:internal/process/task_queues:95:5)

May 20 13:24:30

Worker

at Worker.init (/usr/local/lib/node_modules/n8n/dist/commands/worker.js:82:9)

May 20 13:24:30

Worker

at /usr/local/lib/node_modules/n8n/bin/n8n:70:2

May 20 13:24:30

Worker

May 20 13:24:30

Worker

Connection terminated due to connection timeout

Solved$10 Bounty

2 Replies

2 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


2 months ago

It's a database problem. Make sure your Postgres database is running and accessible. Confirm it’s not paused or out of quota. Increase the volume if necessary.

Also, if you recently rotated credentials, update them everywhere n8n uses them (you can check the admin log).

Or if your DB is just slow to start, you can try increasing the timeout by setting DB_POSTGRESDB_CONNECTION_TIMEOUT to something higher like 60000.


Anonymous
HOBBY

2 months ago

Thank you, increasing timeout helped


Status changed to Solved chandrika 3 months ago


n8n crash - Railway Help Station