Cleaning temp binary_data in executions

Hello !
I’ve noticed that this path (filesystem storage) executions/temp/binary_data is filled without being pruned by EXECUTIONS_DATA_PRUNE. Apparently it’s filled for example with gmail trigger.
Do you confirm that there is nothing to do for deleting those files ?
Should I create a cron task to regulary delete, in every workflow path, these temp folders ?
Many thanks !

n8n version:1.107.4

Hello Ludovic_PAQUET, I’ll try to help yaa!

Yes, on v1.107.44 EXECUTIONS_DATA_PRUME only deletes DB execution records, not files in executions/temp/binary_data. Those temp binaries (e.g., from Gmail Trigger/attachments) arent pruned by that setting.

Maybe there are 2 option that i suggest:

  1. I recommend to upgrade your n8n, newer build improved binary temp cleanup and you wont need a manual job for most cases.
  2. Delete stale temp files older than e.g. 24-72h. Adjust the path to your mounted data dir (/home/node/.n8n inside the container)
# daily, remove temp binaries older than 3 days
0 3 * * * find /home/node/.n8n/executions/temp/binary_data -type f -mtime +3 -delete

If you run it on the host, target the host-mounted folder (e.g. ./n8n_data/executions/temp/binary_data).

Maybe thats all i can share to you, hope this will be works for you! :blush::raising_hands:

2 Likes

Many thanks for your inputs ! I will do a cleaning job first then I’ll check if it is still needed with newer versions.

1 Like

Sure! I hope the problem can be solved. And if it works, if you dont mind.. you can mark it as the solution. Many thanks! :blush:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.