What is the best method to delete the executions?

image

Good evening, how are you? I would like to know the best way to delete old executions, I have been using it for over a year and have around 550,000 completed executions, my n8n version is 0.231.3 and is 8 months out of date, and there have been 24 versions in that time, I tried to update, but it took too long and I gave up, I believe it was due to too many executions.

I would like to know if it is better to select them and then delete them directly via the n8n website, or if it is better to use some command in docker compose

I would also like to know, if possible, two questions:

1 - What is the estimated average time to delete these 550,000 executions?

2- While deleting, I feel that the system is slow, does this slowness interfere with receiving data via webhook and the functioning of active workflows?

Thank you in advance, sorry if anything is written incorrectly, I’m using Google Translate

Information on your n8n setup

  • **n8n version: 0.231.3
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Information on your n8n setup

  • **n8n version: 0.231.3
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker

hello @PedroHenrique26

Better to configure the ENVs to clean up the database

  • EXECUTIONS_DATA_MAX_AGE
  • EXECUTIONS_DATA_PRUNE_MAX_COUNT

Sorry, but I’m a layman
where do I use these commands? My n8n is hosted on digitalocean via docker compose

When using these commands, does it automatically clean those that do not meet the requirements? (date limit and execution limit)

Does this impact the operation of the n8n during this cleaning?

You should use the commands in the docker compose file along with other environments.

Can’t say about the rest questions. I know the pruning works and I didn’t notice any performance issues with n8n.

I added the

EXECUTIONS_DATA_MAX_AGE
EXECUTIONS_DATA_PRUNE_MAX_COUNT

and then I restarted docker-compose

After that, do I need to do anything else to have the executions deleted?

I have 578,069 plays

I limited it to 30,000 executions and the maximum period of 7 days

Thank you, started the deletion

Finally, I can update my n8n, because when I tried before it kept crashing due to too many backup executions

I have 26 updates in arrears, I believe that now I will get it smoothly

1 Like