# Save logs/executions

**URL:** <https://community.n8n.io/t/save-logs-executions/36125>\
**Category:** Questions\
**Created:** [January 30, 2024, 12:02pm UTC](https://community.n8n.io/t/save-logs-executions/36125 "2024-01-30T12:02:35Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![miguelraatz](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@miguelraatz](https://community.n8n.io/u/miguelraatz)\
**Post date:** [January 30, 2024, 12:02pm UTC](https://community.n8n.io/t/save-logs-executions/36125/1 "2024-01-30T12:02:35Z")

</div>

Hello, good morning. I am in the learning phase, conducting tests with the tool, and I noticed that all executions or logs, I’m not sure which, are saved inside the container. I saw in the documentation that there are some environment variables; I tested some, but it didn’t work. Here is the list of variables I tried to use:

EXECUTIONS\_DATA\_SAVE\_ON\_SUCCESS=none  
EXECUTIONS\_DATA\_SAVE\_ON\_PROGRESS=false  
EXECUTIONS\_DATA\_PRUNE=true  
EXECUTIONS\_DATA\_PRUNE\_MAX\_COUNT=50  
EXECUTIONS\_DATA\_PRUNE\_HARD\_DELETE\_INTERVAL=1  
N8N\_LOG\_FILE\_COUNT\_MAX=50

None of them worked. Any suggestions?

## Information on your n8n setup

- **n8n version:** 1.26.0
- **Database (default: SQLite):** default
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):** default
- **Running n8n via (Docker, npm, n8n cloud, desktop app):** Docker
- **Operating system:** ubuntu

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [January 30, 2024, 2:00pm UTC](https://community.n8n.io/t/save-logs-executions/36125/2 "2024-01-30T14:00:50Z")

</div>

Hi @miguelraatz

Not sure if I understand correctly.  
But if you are talking about the executions of workflows, then they are in the database.  
If you setup the postgresql connection then the executions like workflows will be in the database. So this could be external, where ever you put that database.

---

<div class="post-metadata">

**Author:** ![miguelraatz](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@miguelraatz](https://community.n8n.io/u/miguelraatz)\
**Post date:** [January 30, 2024, 2:23pm UTC](https://community.n8n.io/t/save-logs-executions/36125/3 "2024-01-30T14:23:21Z")

</div>

Hey @BramKn,  
Thanks for the reply.

My workflow runs for a long time and involves multiple loops. Because of this, several files are being saved inside the Docker container as if they were execution logs. This is filling up the memory of the server where the Docker container is located, right?

I believe these files are execution logs, and I would like them not to be saved inside the container to avoid occupying disk space.

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [January 30, 2024, 2:37pm UTC](https://community.n8n.io/t/save-logs-executions/36125/4 "2024-01-30T14:37:08Z")

</div>

Hi @miguelraatz

This doesn’t ring a bell for me.  
Executions logs are not stored as files they are only in the database postgres or sqlite.  
Maybe it is the docker logs, but I don’t know why this would fill the disk. What logging level do you have set for n8n container?

---

<div class="post-metadata">

**Author:** ![miguelraatz](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@miguelraatz](https://community.n8n.io/u/miguelraatz)\
**Post date:** [January 30, 2024, 2:55pm UTC](https://community.n8n.io/t/save-logs-executions/36125/5 "2024-01-30T14:55:37Z")

</div>

@BramKn ,

I have to check, I don’t remember. Would this setting be when creating the container? Does it have nothing to do with N8N?

If it’s through environment variables, currently I’m using these:

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/1/7/1786d57e191d6d207e55ba59125b1c470d9ff051.png)

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [January 30, 2024, 3:00pm UTC](https://community.n8n.io/t/save-logs-executions/36125/6 "2024-01-30T15:00:00Z")

</div>

The logging level should be listed here if you changed it. But it isnt.  
What I do see is the Binary data mode which you set to filesystem. This means that all binary data that are processed in the flows are written to the filesystem, so this is probably what you are seeing.  
Are you processing lots of files?

---

<div class="post-metadata">

**Author:** ![miguelraatz](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@miguelraatz](https://community.n8n.io/u/miguelraatz)\
**Post date:** [January 30, 2024, 4:52pm UTC](https://community.n8n.io/t/save-logs-executions/36125/7 "2024-01-30T16:52:24Z")

</div>

@BramKn Yes.

My workflow downloads a 100MB file, extracts it, then converts it to CSV and saves it to the database.

After extracting, the file contains many lines, and when reading, the following error occurred:

ERROR: Cannot create a string longer than 0x1fffffe8 characters

That’s why I set the variable N8N\_DEFAULT\_BINARY\_DATA\_MODE=filesystem.

---

<div class="post-metadata">

**Author:** ![miguelraatz](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@miguelraatz](https://community.n8n.io/u/miguelraatz)\
**Post date:** [January 30, 2024, 5:02pm UTC](https://community.n8n.io/t/save-logs-executions/36125/8 "2024-01-30T17:02:44Z")

</div>

this is my workflow

When extracting the file without the variable, it returns the error I mentioned above,  
And with the variable, it can extract, but it runs into the issue I mentioned, filling up the disk with many files.

---

<div class="post-metadata">

**Author:** ![miguelraatz](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@miguelraatz](https://community.n8n.io/u/miguelraatz)\
**Post date:** [January 30, 2024, 5:04pm UTC](https://community.n8n.io/t/save-logs-executions/36125/9 "2024-01-30T17:04:59Z")

</div>

my sub workflow

@BramKn any tips?

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [January 31, 2024, 2:04pm UTC](https://community.n8n.io/t/save-logs-executions/36125/10 "2024-01-31T14:04:24Z")

</div>

Ok so this runs a very long time for lots of files?  
As long as this flow is running it will keep the files so you are probably messing it up that way.  
It would help splitting it up with a queue to make sure the workflow isnt constantly running and retaining the files. As I think they are deleted after the flow was completed.

Ps. Please do not tag me a second time if I do not reply directly. This makes me not want to help you any further…

---

<div class="post-metadata">

**Author:** ![miguelraatz](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@miguelraatz](https://community.n8n.io/u/miguelraatz)\
**Post date:** [January 31, 2024, 2:15pm UTC](https://community.n8n.io/t/save-logs-executions/36125/11 "2024-01-31T14:15:51Z")

</div>

I understand, how could I split it into a queue? I have no idea what to do…  
Sorry for the mention; it won’t happen again.

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [January 31, 2024, 2:26pm UTC](https://community.n8n.io/t/save-logs-executions/36125/12 "2024-01-31T14:26:20Z")

</div>

You can send the data for the files like filename or url to a queue like RabbitMQ and then have a workflow be triggered by that queue. Make sure to edit the parallel processing option. There should be a few examples on the forum on this.

it is fine to mention just not a second time like this:  
 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/f/3/f3afe1fb3a9ade659ce30733cc8384622c637b24.png)

---

<div class="post-metadata">

**Author:** ![miguelraatz](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@miguelraatz](https://community.n8n.io/u/miguelraatz)\
**Post date:** [January 31, 2024, 2:39pm UTC](https://community.n8n.io/t/save-logs-executions/36125/13 "2024-01-31T14:39:53Z")

</div>

Sure, thank you very much for the response and patience. I’ll try to apply what you said. Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [April 30, 2024, 2:40pm UTC](https://community.n8n.io/t/save-logs-executions/36125/14 "2024-04-30T14:40:15Z")

</div>

Closed on April 30, 2024, 2:40pm UTC

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