It looks like n8n is starting to eat up my server disk space.
I feel like when I update my server and restart then some of my space gets freed up but as you can see n8n is still slowly using up my 50 GB server.
This is not an issue yet, just wanted to see what it might be and how I can fix it.
Do I need to update this in the .env file?
If so, I am not sure how to update the file, and my server is now holding at over 90% full
Got to figure this our soon lol
You have 2 options… You could use SFTP to download the file, edit it and upload it or you could use nano or vim to edit the file… I would recommend nano if it is available it is a bit more user friendly and a lot easier to exit (How to Exit Vim Editor - Stack Overflow Blog)
To start editing go where the file is and run nano .env or vi .env and it will open the editor and you can start working away on it.
How do you run in? Via docker? In this case you also have to add entries for the variables in the docker-compose file (under the environment section) and restart n8n that it gets used.
Yes, I am running Docker.
So what do I need to add entries for the variables in the docker-compose file.
How can I do that?
Any insight would be extremely helpful.
It is a text file like the .env file. So you can edit it the same way. You can also see how the other environment variables are defined in it already. So you can add the new ones the same way.
Add the vacuum, prune and max age env options to the docker compose file. I would probably remove them from the .env as well as you only need it in the compose file.
No, do not add all of them, add only the ones you did also add to the .env file so that they actually get picked up and used.
And removing them from the .env could break things. Depends on how you set them.
...
environment:
# If it is only a key is set it means it will read the value from
# the .env file and injects it. So if you remove it from the .env
# file it will break.
- N8N_BASIC_AUTH_USER
# Is defined with a value. So there is no need to have it in the
# .env file as it does not get used as the value is hardcoded.
- N8N_BASIC_AUTH_USER=jim
...
I have same issue. I am running n8n using docker compose. I have added both data execution prune and vacuum commands to compose and environment file, still n8n size has increased and using full 25GB of my VPS. Given below is data from my VPS.
Can you check the actual size of your database file to verify whether this is what’s causing the problem for you?
If it’s indeed the database eating up that much space here it’d be worth checking if there are any problems around data pruning. In a first step I’d check the server logs after re-starting n8n for any errors around this. If you encounter any such errors you might want to open a new topic with all relevant details seeing this is a rather old thread that’s easy to overlook.
Just an update - Since I opened this topic on Feb,22 I can confirm that I never really solved the issue.
Since then my server disk usage went up to about 95% and just held there, then I installed n8n on my own server setup outside DigitalOcean and have not yet run into this issue once more.
In the back of my mind I simply figured that if this was a bigger issue more people would have run into this bug… I feel like it is just something I may have overlooked that caused such a big issue, that is why I started from scratch.
@David_Go I had the issue when I first setup n8n and for me it was the vacuum option that I was missing, It turns out that while SQLite does delete the data it doesn’t actually give back the space until the vacuum runs (VACUUM).
I think it only runs on a service start as well which is why sometimes it can take a while to start up after an upgrade if it hasn’t been done for a while or if there is a lot of data being logged. I also found only logging failed executions helps but since then I have moved to Postgres and all has been good.