502 Gateway issue, but my Postgres has space.

newlefty
HOBBY

20 days ago

Hi, I'm having a 502 Gateway issue. My postgres disk space seems to have space as it's set to 5 GB and I've used up 3 GB. It keeps crashing every 15 mins or so. Could the disk space be misread and I'm really out of space?

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.

Jul 15 11:59:05

at DbConnection.init (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+db@file+packages+@n8n+db_@sentry+node@8.52.1_ioredis@5.3.2_mongodb@6.11.0_@aws-sdk_f7bd9984f5e38971ca100f511ef3ee0b/node_modules/@n8n/db/src/connection/db-connection.ts:55:13)

Jul 15 11:59:05

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

Jul 15 11:59:05

at Start.init (/usr/local/lib/node_modules/n8n/src/commands/base-command.ts3)

Jul 15 11:59:05

at Start.init (/usr/local/lib/node_modules/n8n/src/commands/start.ts:202:3)

Jul 15 11:59:05

at CommandRegistry.execute (/usr/local/lib/node_modules/n8n/src/command-registry.ts:64:4)

Jul 15 11:59:05

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

Jul 15 11:59:05

Jul 15 11:59:05

Connection terminated due to connection timeout

$10 Bounty

3 Replies

Railway
BOT

20 days 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!


20 days ago

That looks like a connection error from within your app, not your database; are you sure your database is running, and you have the right connection string?


aleks

That looks like a connection error from within your app, not your database; are you sure your database is running, and you have the right connection string?

newlefty
HOBBY

20 days ago

I'm using the Postgres Railway created for me and its says the Postgres is online via Docker. Where can I find the connection string?


502 Gateway issue, but my Postgres has space. - Railway Help Station