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;
1 Replies
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
2 months ago
You can try resetting the WAL files (keep in mind that there's a small chance that database corruption can happen):
- Set your Postgres start command to be sleep infinity and redeploy.
- Go to the console tab after clicking on your service.
- Run
su postgres, followed bypg_resetwal -f /var/lib/postgresql/data/pgdata - There should be a log that says "Write-ahead log reset"
- 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.