PDF to text error in the loop

I have four PDF files. I download them from Google Drive and convert them to text using a PDF-to-text tool. That’s why I added a loop here. It checks if the PDF already exists; if not, it adds it; if it does, it continues. However, after the second loop, during the conversion from PDF to text in the third loop, the system switches to offline mode and the program crashes every time. No matter what I try, I can’t find a solution. Could you please help?

Hi @okan.sozeri if the extract from PDF crashes, means it is going out of memory, which is common as it needs more memory to compute that operation, increasing your n8n instance configuration would really be a good move! But on self hosted you can do change this variable:
N8N_DEFAULT_BINARY_DATA_MODE=filesystem
so that n8n actually writes everything on DISK instead of filling the ram, although for workflow improvements i would say if you are parsing more than 1 pdf consider not doing that, let me know if this helps

@okan.sozeri, the loop keeps all binary data in the parent execution’s memory so by the 3rd PDF it chokes — move the actual PDF extraction into a sub-workflow via Execute Workflow node, that way each PDF gets its own execution context and memory gets released after each one finishes.

Put your Google Drive download + Extract from PDF into a separate workflow, point the Execute Workflow node at it, batch size 1 so only one PDF lives in memory at a time.