Describe the problem/error/question
We encountered an error in n8n while processing a binary file in a Code node.
The execution stops with the following message:
“Execution stopped at this node – n8n may have run out of memory while running this execution.”
In our workflow, we are converting a binary file (PDF) to a Base64 string using JavaScript in the Code node.
Example logic used:
Get binary data from the item
Convert it to Base64 using binaryData.toString(‘base64’)
Store the result in items[i].json.pdfBase64
However, when running the workflow, the execution stops with a memory error.
We would like to understand:
Whether converting binary data to Base64 in this way can cause memory issues in n8n
If there is a recommended approach to handle large binary files
Whether there is a configuration or limit related to memory usage
Any suggestions or best practices would be appreciated.
What is the error message (if any)?
Please share your workflow
Share the output returned by the last node
Information on your n8n setup
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system: