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?
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.
Which error are you looking at there? The sqlite full one or where the process was stopped? You don’t have max age in your config that has an error either.
@Shirobachi The vacuum command kind of creates a new database with only the required data. It seems like you do not have space to do that right now. So you either have to temporarily increase the storage size (if possible) or make space another way so that this process can run at least one time. If you then set also the other variables as mentioned above, the database should hopefully never get that large ever again.
Oh thanks for that, this is useful information, now db is only 15M, can you confirm that following config will prevent db from being 8GB (like was now) I really am sure that I config this before, but maybe I did sth wrong…
Based just on that config I can’t promise anything about the database size, It all depends on what you are logging and how often your workflows are running.
An example here would be if you are saving all execution data over 90 days for a task that runs every minute it is likely going to store more data than a task that runs weekly or once a day this of course does also depend on how much data is being processed.
What I do is turn off all logging apart from errors for all workflows as a default option…
I also now only use a max age of 14 as I will generally know within 2 weeks if something has failed and will have it fixed.
Annoyingly there is no magic answer, I got to my preferred options over the course of 6 months of playing with n8n and I have found what works for me and the company I worked for previously.
Not sure if this answers your question but hopefully it will help.