Latest executions auto erased from DB

I have not set any executions save/prune related env vars. Defaults apply.

On my instance the latest executions are being deleted from the DB. I am referring to production executions triggered via rmq. Strangely all executions post Nov 28 - 2023 are getting pruned.

Does default prune latest executions first?

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

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:

@n8n I provided the same in my original post.

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

@MutedJam @jan Can someone help me with this please?

Hi @Gowthaman_Prabhu

Sadly Tom doesn’t work at n8n anymore.
And there is no need to tag Jan if you do not get a fast reply.
The new support team is still ramping up so replies should get faster. :slight_smile:

To answer the question, the default settings will prune your executions this should be from the old executions, but it might not start at the oldest.
It should prune everything older than 2 weeks if I recall correctly. There is also a limit of 10k executions to be saved by default. So if you have a lot of executions in a short time you might want to change that setting. :slight_smile:

@BramKn Thank you for the response. My apologies for tagging individuals on random. I only knew those folks up until now :smile:

Ok so setting EXECUTIONS_DATA_PRUNE=false should stop deletion completely yes?

And if we need pruning but only WF’s older than 60 days will EXECUTIONS_DATA_HARD_DELETE_BUFFER=1440 with EXECUTIONS_DATA_PRUNE=true suffice?

that should stop it yes.
If you enable it you also have to set the max nr of executions ENV variable to make sure it doesn’t prune with that setting in mind.

2 Likes

@BramKn Thank you very much.