Connection lost in n8n when looping many requests (RAG example with OpenAI Embeddings)

Hi,

I’m trying to use the RAG example in n8n: I send data from a list into OpenAI Embeddings and then store the vectors in the vector store.

The problem: whenever the list is too long and many requests are sent in a loop, n8n shows “lost connection” (top right corner). I’ve seen this happen multiple times, basically whenever I have workflows that send a lot of requests in a loop.

For me this makes n8n hard to use, because RAG ingestion or similar scenarios always require sending many requests.

Why does n8n lose the connection in this situation?

And is there a recommended way to handle large loops with many outgoing requests without hitting this problem?

Thanks a lot!

@fynns Yeah, that “lost connection” thing happens when n8n tries to fire off too many requests in one go - the UI just times out even if the backend’s still crunching. For stuff like RAG ingestion, it’s way more stable if you batch the list instead of looping each item, or split it into chunks with the Split In Batches node. Some people also trigger a sub-workflow to handle chunks separately so it doesn’t overload one run. Breaking it down into smaller pieces usually fixes the issue.

Can you elaborate on this? I have been running into this issue exactly and cannot upload 39+ split binary csv files with 500 rows each.

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