We wanted to figure out how exactly data pruning is working:
So, our environment variable regarding EXECUTION_DATA:
EXECUTIONS_DATA_MAX_AGE=336
EXECUTIONS_DATA_SAVE_ON_ERROR=all
EXECUTIONS_DATA_PRUNE=true
The problem is that executions are saved for only 11 hours. All of them, no successful or error executions available older than that.
We would like to save everything for 14 days or at least 7.
We would start with error executions and then move to all.
What could be the problem with why executions are not saved?
Maybe we have missed something, OR maybe there is an env variables combo which is not working?
## Information on your n8n setup
- **n8n version:** --> Version 1.89.2
- **Database (default: SQLite):** --> PostgreSQL
- **Running n8n via (Docker, npm, n8n cloud, desktop app):** --> Docker
@hubschrauber Ahaa, maybe that is the problem. Yeah, we are running a LOT more. There is nothing mentioned about the default 10k EXECUTIONS_DATA_PRUNE_MAX_COUNT in the docs. In the docs, an example is 50k. What is the max amount?
Yeah, the “guide” glosses over a few things. They could probably make some improvements to the way that is documented. There is a link to the environment variables reference on that page, but it doesn’t exactly catch your attention.
Anyway, hope that helps you get things set up like you want them. Once you confirm whether that “count” setting makes the difference, please click the “solved” button (blue box with checkmark) on the post that has the answer.