Difference between 'binaryDataTTL' and 'persistedBinaryDataTTL' in binary data

Hi,

We are recently incorporating the binary data management changes introduced in n8n into our project, from release 0.156.0 (commit → ✨ Introduce binary data management (#2059) · n8n-io/[email protected] · GitHub) & 0.157.1 (Comparing [email protected][email protected] · n8n-io/n8n · GitHub).

we have following questions:

  • Can you please explain the major differences between these two configuration ‘binaryDataTTL’ and ‘persistedBinaryDataTTL’ ? What makes them unique ? it seems like when the workflow is active, it’s being persisted under the category of ‘persistedBinaryDataTTL’ and when a workflow is executed in manual mode, it falls under the category of ‘binaryDataTTL’. But can you please elaborate more on the difference b/w the configurations ?

  • What’s the reason/wisdom behind not deleting the binary data from disk right away, after the completion of the execution?

  • Also, is there any other commit or release that carry any binary data Management related changes/fixes that we should must implement along with above mentioned changes? (We can’t pull the n8n’s latest code, so please suggest keeping that in mind).

Really looking forward to receiving answers of these questions. Thanks.

Hi @Shahtaj_Khalid, persistedBinaryDataTTL would specify the lifetime of binary data for executions that aren’t persisted to your database (or in other words for which you have turned saving execution data off). N8N_PERSISTED_BINARY_DATA_TTL specifies how long binary data is kept for executions for which you are saving execution data.

As to why certain design decisions have been made (like saving the data) you might want to ask our product team (perhaps @sirdavidoff can jump in here).

To get an idea of all changes made since a specific version I suggest checking out the changelog for version since 0.167.0 and the release notes in our docs for versions older than that.

1 Like

Good question — we keep binary data around after the execution so that you can inspect/debug/re-run past executions. Since this is often an important part of developing a workflow, we wanted to make sure that it was still available when storing binary data in the filesystem.

1 Like