Workflow not running to completion but not showing error

Describe the problem/error/question

As title states, I have a workflow that is not running to completion but not showing any error. This workflow is supposed to process roughly 1400 records, but only makes it to 170 and then stops without kicking any error.

What is the error message (if any)?

N/A

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.106.3
  • Database (default: SQLite): cloud
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system: n8n cloud

Where does it stop running? Can you show a screenshot of the execution?

It looks like the ‘Update Sheet’ node is the last one to execute. Another note: The execution log says that each execution errors out after a few milliseconds, when in actuality the workflow runs for at least a few minutes before it stops.

When you run it manually, what exactly happens after 17 runs?
Is it always 17 or the number of iterations changes?

So far, this looks like either one of

  • the flow rans out of memory
  • the last node in the loop doesn’t produce any output and that’s why execution stops

Given the execution was marked as error, I tend to believe that it was due to memory.

You can test it by enabling “Always output data” in the settings for the last node in the loop and running it again.

The last node definitely had output, so if what you’re saying is true it must be a memory issue. How much memory does the Pro plan afford?

Here are the limits:

removing the wait node seemed to let the workflow process a little further. I also increased the batch size to 500 and it stopped at the set node so it does appear to be a memory issue although I can’t figure out how this one workflow is chomping through 600+ mb of memory in processing 1400 rows from an excel sheet.

You could iterate over ranges on the sheet, then re-think the code node (if you really need it), both of these are recommendations from the “How to reduce memory consumption in your workflow” doc:

“iterate over ranges on the sheet”

Isn’t that what the loop node is already doing? Please forgive my ignorance here.

The code node is necessary to upsert the data into hubspot correctly.

I must be missing something..

right now it is getting all the rows at once, you could however try to split and get them by ranges of 100 or something. I don’t have access to Office365, but I assume you would use this parameter to specify the range:

as for the code node well, if you gotta have, then you gotta have it.

I’ll give it a shot, but I’m not quite sure how to go about it. If each row has a total of 13 columns (A - M) how would I configure these fields in order to iterate over all 1400 rows?

The first range would be A2:M101, then A102:M201 and so on. Again I have nothing to test on, but I think this type of slicing should work.

Are you suggesting that I manually set the range 14 times to run this automation? Or is there another way?

If I had to do it, I’d create an array of indexes of row numbers: [1, 201, 401, 601…]
split it into separate items
iterate over them and on each iteration I’d get current row and construct the range as A{row_num}:M{row_num+199}

I discovered that the hubspot node was returning a ridiculous amount of data - I simplified the output and the workflow now runs without issue. Thanks for your help @jabbson

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