i have setup a hetzner docker installation like described here: Hetzner | n8n Docs
Now i was making a workflow by downloading a file (~3GB) on google drive and then send this to youtube.
My server only has 4GB of RAM, so i thought i am setting up N8N_DEFAULT_BINARY_DATA_MODE=filesystem like found in many topics.
But it does not have an effect, it still uses the RAM.
What i did
changed .env
changed docker-compose.yml
docker compose up -d --build
Output is " n8n may have run out of memory while running this execution. More context and tips on how to avoid this in the docs"
n8n version: 1.95.3
Database (default: SQLite): SQLite
n8n EXECUTIONS_PROCESS setting (default: own, main): own
Running n8n via (Docker, npm, n8n cloud, desktop app): docker
Correct environment variable, the official documentation specifies that N8N_DEFAULT_BINARY_DATA_MODE String default — The default mode is to keep binary data in memory. Change to filesystem to store them on disk (or S3)
Pass it through docker-compose.yml. Although there isn’t an exact snippet in the documentation, the section on environmental variables clearly states that it should be set as the container environment, not just in .env: N8N_DEFAULT_BINARY_DATA_MODE=filesystem
Storage Path
The docs indicate that the filesystem mode will save the data in:
N8N_USER_FOLDER/binaryData
(which in Docker corresponds to /home/node/.n8n/binaryData)
Clean Restart of the Container
Although it doesn’t appear directly in the docs, the recommended practice in Docker is:
docker compose down -v
docker compose up -d --build
and then verify with: docker exec -it <n8n> env | grep BINARY
This is supported by the community, which suggests using down -v to remove volumes and ensure the container loads the new variable
Still its NOT working. I did not change anything in the container so permissions must be good, right?
Is there any error log i can see maybe?
I dont understand, why its using memory still
I understand it that way, that it takes “max_old_space_size” as maximum RAM usage, then writes the file.
Or n8n writes directly, also ok.
But in both cases it shall work, right?
Here is also a screenshot of my server, when downlading the video from Google Drive.
It just stops at short before maximum RAM, process is still running for like 1-2 minutes and then its canceled at some point.
Partially ashamed i am now posting myself the answer
Its working correctly, the problem is the Google Drive download, which is simply ignoring the setting.
I now solved this via HTTP Request and then could upload the video to youtube.
RAM is not nearly at maximum now and server is not lagging at all.
Sorry for disturbing.
Whoever develops the Google Drive node shall really work on this because i think this could make life much easier.