I set these settings to delete logs after 2 days;
But it doesn’t seem like it is working:
Information on your n8n setup
- n8n version:Version 1.11.2
- Database (default: SQLite): DEFAULT
- n8n EXECUTIONS_PROCESS setting (default: own, main): DEFAULT
- Running n8n via (Docker)
- Operating system: Ubuntu 22.04 X64
No ideas about this anyone?
Hi @onurbolaca That environment variable doesn’t look quite right -
EXECUTIONS_DATA_AGE should be
EXECUTIONS_DATA_MAX_AGE, as per the documentation here: Execution data | n8n Docs
Can you fix that up and see if it helps?
Thank you @EmeraldHerald for answer,
Do you know any way to change this setting without deleting my docker container? All the flows already built, I just need to change this settings that’s all
You have to restart n8n, else the new setting will not be applied. There is no way around it.
This should, however, not be a problem as the data should be persisted if you configured everything correctly. So it can be restarted (delete and recrate the container) a thousand times without a problem and without losing any of your workflows.
If you are not sure if you configured everything correctly or if you do not have the knowledge to host an application like n8n yourself I recommend you to look at our cloud solution, where we take care of the heavy lifting. We see a lot of self-hosters on the forum who lose workflows or have extended downtimes because of configuration issues and/or insufficient knowledge in for example, Docker. For that reason, did we add this warning to the docs:
Thanks @jan ,
I always try to find safe and different ways for my existing customers who already be promised with their own server. Like every developer, we all learn.
Can you suggest a docker command to restart container safely?
I used docker compose down and docker compose up in a test environment and it removed all the flows that is already backed up.
Ah yes, it is great to learn and super important. Think that is something most do generally way too little and we would be much better off if people would focus on it more! Having said that, it is important in what environment we do it. Learning to drive in an empty parking lot is different from doing it with a full bus on a highway. Meaning, having a self-hosted n8n setup for pet projects is different from running important production workloads. The latter sadly ends up he most time with a lot of problems. Because following a guide and getting something initially up and running, is very different from keeping it running and maintaining it (I for sure can get my car out of the garage and drive to the shop, I am, however, the last one who should change the breaks if they wear down).
Regarding commands. Sadly no idea how exactly you run n8n. If you have it for example running with docker-compose, it would be:
# Stops the setup
# Removes the current one
# Starts up the setup again
docker-compose up -d