Database.sqlite Error: database or disk is full

Hello, the disk from my VPS is almost full and im trying to VACUUM the database:
781074 13700076 -rw-r–r-- 1 ubuntu ubuntu 14028853248 Sep 27 19:12 /root/n8n/.n8n/database.sqlite

but i get error: sqlite> VACUUM;
Error: database or disk is full

I’ve already requested the increase of the disk with the provider, but I’m not getting a return and I need to solve it urgently.
Is there any way to solve this?

why need disk space if i want to reduce?

my config is docker-compose.

environment:
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER
- N8N_BASIC_AUTH_PASSWORD
- N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
- N8N_PORT=5678
- N8N_PROTOCOL=https
- NODE_ENV=production
- WEBHOOK_TUNNEL_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
- DB_SQLITE_VACUUM_ON_STARTUP=true

Have you tried setting the data prune and data Max age options then restarting the container and seeing if that helps?

Yes, after posting here, I tried it, and not work.

environment:
  - N8N_BASIC_AUTH_ACTIVE=true
  - N8N_BASIC_AUTH_USER
  - N8N_BASIC_AUTH_PASSWORD
  - N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
  - N8N_PORT=5678
  - N8N_PROTOCOL=https
  - NODE_ENV=production
  - WEBHOOK_TUNNEL_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
  - DB_SQLITE_VACUUM_ON_STARTUP=true
  - EXECUTIONS_DATA_PRUNE=true
  - EXECUTIONS_DATA_MAX_AGE=168

Do you still get the same error when trying to run the vacuum? It can take a bit of time on startup to kick in.

My general recommendation if planning to use the SQLite option is below, it will save very little data as having the successful data being stored isn’t normally needed and 90 days of data for us is enough. Of course the vacuum option as well is handy.

 - EXECUTIONS_DATA_SAVE_ON_ERROR=all
 - EXECUTIONS_DATA_SAVE_ON_SUCCESS=none
 - EXECUTIONS_DATA_SAVE_ON_PROGRESS=true
 - EXECUTIONS_DATA_SAVE_MANUAL_EXECUTIONS=false
 - EXECUTIONS_DATA_PRUNE=true
 - EXECUTIONS_DATA_MAX_AGE=90
1 Like