Execution Pruning

#4
by Ytosko - opened

Hey, I was facing some issue, like number of execution became more than 5000 and making supabase limit more than 0.5GB which is not supported in free version.

Then added a workflow to delete execution everyday which is making the interface crashed.

I have done some digging and find out there some ENV that does it safely and works like a charm. i.e.

EXECUTIONS_DATA_PRUNE
EXECUTIONS_DATA_MAX_AGE
EXECUTIONS_DATA_PRUNE_MAX_COUNT

Please see the docs. and lets do it if it is doable! It can help many users. Let me know if we can do it.

I got this from internet:

These variables work together to control the pruning process. For instance, if you set EXECUTIONS_DATA_PRUNE to true, EXECUTIONS_DATA_MAX_AGE to 24, and EXECUTIONS_DATA_PRUNE_MAX_COUNT to 100, n8n will automatically delete any execution data older than 24 hours and will keep only the last 100 executions, deleting older ones if the count exceeds 100.

Please verify it and lets see if we can add this

Thanks

Hi Saiki,

Thank you for sharing the details of the issue and your findings.
If you already have a working and tested solution using the environment variables you mentioned, we would be happy if you could share it with us so that everyone can benefit from it.

Your contribution could help many users facing similar limitations.

Best regards,
Abcdo

Hey Abcdo,

Sorry I for late reply, I tried these but not working moreover I am hitting this error again and again:

{:shutdown, :db_termination} DbHandler exited Connection terminated unexpectedly {:shutdown, :db_termination} DbHandler exited DbHandler exited Connection terminated unexpectedly

Please tell me if you know the solution somehow.

Thanks

Update

Solution: Set ENV N8N_RUNNERS_ENABLED to true in space settings and increase pool sixe to 48 in supabase setting and it is solved!

Ytosko changed discussion status to closed

@Ytosko
Thank you, you did a good job, this is an amazing result, you deserve thanks, how nice it is to share information and experiences

Sign up or log in to comment