Clear Executions in Bulk

Is there any way I can remove these executions?

Looks like a few of my Telegram bots got so popular :relieved:

image

I tried to select and delete it, but this throws an error.

image

3 Likes

Hi @mcnaveen, sorry to hear you’re having this trouble. Looking at the number of executions, I wonder if your database might be unhealthy here.

I assume these are rather old executions? If so, my first step would be to implement the maintenance steps described here in the docs (and if you’re using SQLite also the part from the Keep in mind box) and then restart n8n to see if that already helps.

2 Likes

Hi @MutedJam

As you said, I added EXECUTIONS_DATA_PRUNE, EXECUTIONS_DATA_MAX_AGE, and DB_SQLITE_VACUUM_ON_STARTUP in the env.

But even after restarting the host machine. I still see the same number of executions.

And I assume your executions are older than your max age, right? Is there any output in your server logs suggesting what the problem might be when trying to delete these old executions?

1 Like

I don’t see anything in logs at the moment, But when I tried opening n8n it was loading indefinitely.

Do you think DB_SQLITE_VACUUM_ON_STARTUP is doing something in the background? May be?

Yes, it sounds like your n8n container hasn’t finished restarting yet. For a huge database it might take a while to clean up, especially if this has never been done before. As per the docs:

This is a long running blocking operation and will increase start-up time

2 Likes

After long reloading. Finally this. :relieved:

From 716k Executions to 597k Executions. Looks like I have to restart couple more times.

image

I’m really surprised that out of 716k executions, 715k executions happened within this week within a short period of time gap.

This instance is hosted on a 3.99 Euro Hetzner server.

n8n handled so well. :tada:
I always mention n8n as God. This is the Power :fire:
C.C: @jan @maxT

I’ll update this thread once this sorted out.

Thanks, @MutedJam :pray:

1 Like

Everything clear.

image

Thanks @MutedJam :heart:

2 Likes

Awesome, thanks so much for confirming!

1 Like