Postgres Database Full (500MB limit) - n8n Cannot Connect
Anonymous
FREEOP

2 months ago

Subject: URGENT - Postgres Database Full (500MB limit) - n8n Cannot Connect

Issue: My Postgres database (Postgres-75ir) has reached the 500MB plan limit and is completely full. This is preventing my n8n service (n8n-32TU) from connecting to the database.

Error Details:

Postgres logs show: ERROR: could not extend file "base/16384/16806": No space left on device

n8n logs show: Database connection timed out and Failed to hard-delete executions

The database is trying to auto-delete old executions but cannot because the disk is full (catch-22)

What I Need: I have 10+ workflows in n8n and I only need to save the first 3. To do this, I need to:

Access n8n's UI to manually export those 3 workflows

But I can't access n8n because the database is full

Request: Can you please manually run a cleanup query on my Postgres database to delete old execution data? This should free up ~400MB of space:

DELETE FROM execution_data;

DELETE FROM execution_metadata;

DELETE FROM execution;

DELETE FROM audit_log;

VACUUM FULL ANALYZE;

$10 Bounty

1 Replies

Railway
BOT

2 months ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway 2 months ago


You can try resetting the WAL files (keep in mind that there's a small chance that database corruption can happen):

  1. Set your Postgres start command to be sleep infinity and redeploy.
  2. Go to the console tab after clicking on your service.
  3. Run su postgres, followed by pg_resetwal -f /var/lib/postgresql/data/pgdata
  4. There should be a log that says "Write-ahead log reset"
  5. Remove the custom start command and redeploy

You can also run the DELETE and VACUUM commands by running psql first in the console (make sure the start command isn't set for this).

Or you can upgrade to the Hobby plan.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...