Repeated start of workflow until its end

Describe the problem/error/question

During operation of the running workflow, the process is restarted.

I’m reading 396 Mb JSON file, splitting it in to the items and routing by values.

What is the error message (if any)?

Workflow execution had an error
This execution failed to be processed too many times and will no longer retry. To allow this execution to complete, please break down your workflow or scale up your workers or adjust your worker settings.

and, after trying to stop errored workflow:

Problem stopping execution
Only running or waiting executions can be stopped and 519 is currently error

Please share your workflow

My SIMPLIFIED workflow that double run while first run is still running:

{ "nodes": [ { "parameters": {}, "type": "n8n-nodes-base.manualTrigger", "typeVersion": 1, "position": [ -460, 1340 ], "id": "2b74eca7-0577-42b9-8910-5679dd0d8294", "name": "When clicking ‘Test workflow’" }, { "parameters": { "operation": "fromJson", "options": {} }, "type": "n8n-nodes-base.extractFromFile", "typeVersion": 1, "position": [ 40, 1340 ], "id": "d7e43741-50dc-47bf-8c0a-dab0a62e0dfc", "name": "Extract from File2" }, { "parameters": { "fileSelector": "/home/node/.n8n/scripts/intercom/ap/intercom_ap_contacts_full.jsonl", "options": { "mimeType": "application/json", "dataPropertyName": "data" } }, "type": "n8n-nodes-base.readWriteFile", "typeVersion": 1, "position": [ -220, 1340 ], "id": "34b1f3a9-a7f2-4c9a-a207-9a96f52617f4", "name": "Read/Write Files from Disk" }, { "parameters": { "fieldToSplitOut": "data", "options": {} }, "type": "n8n-nodes-base.splitOut", "typeVersion": 1, "position": [ 260, 1340 ], "id": "b1035258-b76a-417e-87a2-31faf892a0d5", "name": "Split Out2" }, { "parameters": { "rules": { "values": [ { "conditions": { "options": { "caseSensitive": true, "leftValue": "", "typeValidation": "strict", "version": 2 }, "conditions": [ { "leftValue": "={{ $json.role }}", "rightValue": "user", "operator": { "type": "string", "operation": "equals" }, "id": "f3a8e803-e748-4218-97bb-a4be6fa0fc8c" } ], "combinator": "and" }, "renameOutput": true, "outputKey": "users" }, { "conditions": { "options": { "caseSensitive": true, "leftValue": "", "typeValidation": "strict", "version": 2 }, "conditions": [ { "id": "42802f1d-f426-4087-927e-b7dd1751b97c", "leftValue": "={{ $json.role }}", "rightValue": "lead", "operator": { "type": "string", "operation": "equals", "name": "filter.operator.equals" } } ], "combinator": "and" }, "renameOutput": true, "outputKey": "leads" } ] }, "options": {} }, "type": "n8n-nodes-base.switch", "typeVersion": 3.2, "position": [ 480, 1340 ], "id": "b92c04c3-16de-4108-9c43-d329bc6c106d", "name": "Role Selector" } ], "connections": { "When clicking ‘Test workflow’": { "main": [ [ { "node": "Read/Write Files from Disk", "type": "main", "index": 0 } ] ] }, "Extract from File2": { "main": [ [ { "node": "Split Out2", "type": "main", "index": 0 } ] ] }, "Read/Write Files from Disk": { "main": [ [ { "node": "Extract from File2", "type": "main", "index": 0 } ] ] }, "Split Out2": { "main": [ [ { "node": "Role Selector", "type": "main", "index": 0 } ] ] } }, "pinData": {}, "meta": { "templateCredsSetupCompleted": true, "instanceId": "89684fd541ddbfd04a752524135b6ba210c6af6eba3acf5431d1441bc8410e85" } }

Link to screencast of process: Access via Synology
Sorry for 10+ mins.

Share the output returned by the last node

None

Information on your n8n setup

Operating System

Ubuntu 24.04.2 LTS (GNU/Linux 6.8.0-1027-aws x86_64)

n8n Version:

1.93.0

Node.js Version:

v18.19.1

Database:

PostgreSQL

Execution mode:

queue

===
I’ve raised an issue: Workflow execution had an error #15188 but it was closed.

===
Any advices?

This is not a bug, you’re pushing n8n to its limits and are seeing the repercussions of that, I would reccmond using subworkflows. This is usually my go to for massive amount of items/data. Or you could just do all that in a code node, you have full access to js/python.

Thnx for the reply @Daniel_Lamphere
But i’m already using Code node (see screen attached)

Can uou share sub-wf example?