staticData in n8n Cloud

Hey, I have been working with staticData in my Workflow a lot recently. And I also got rid of data non needed anymore. However, now I cant call $getWorkflowStaticData(‘global’) anymore. It runs forever, and I have to stop the workflow manually. Now, I think something with my deletion logic didn’t work out and there is just lots of data stored. At least that’s my theory why this line is executed endlessly.
Now to my question: How can I delete all the static data stored globally for the workflow without having to call $getWorkflowStaticData(‘global’) obviously, as this doesn’t execute anymore.
Thanks in advance! Tim

1 Like

Hi,

the “staticData” stored in the Workflow. If you’re using n8n local,open the workflow file and edit the JSON so that “staticData“ is set to “[null]”. If you’re using n8n cloud, please wait - I’m currently testing something related to this.

Flo

Hey, thanks for your answer! I am using n8n cloud :slight_smile:

Ok, I‘ve build a workflow to explain why it happens and how to fix it:

Thank you for you help! This looks great, however just running the line “const staticData = $getWorkflowStaticData(“global”);” takes my workflow hours. It just doesn’t terminate. So trying to delete the data via a function node doesn’t seem to be an option I think, unfortunately.

Did you already try to run my deletion code? Because if I overload staticData the code still functions.

If it doesn’t work, you could download the workflow, upload it to a new workflow (which resets the static data), and implement better data handling in the static data. For example, use my solutions.

It is currently running. Its 20 min in. How do you normally realize that you overloaded staticData? Because I didn’t get an error or a warning, it’s just that calling static data takes hours.

If it’s running more than 20min. you can be pretty sure that it’s not functioning. Stop the execution and see what nodes ran.

Well, i triggered the Delete all data in staticData part of your workflow, but only the trigger ran successfully. The Delete StaticData not.

Okay i just realized: none of my function nodes seem to work anymore. Even when I just try and return a string, they keep on running.

Doesn’t seem to be a problem with staticData after all, but a much bigger problem it seems.

Okay, this seems to be a known problem. Code node executes forever on my N8N cloud hosted Starter instance and Code Nodes turning without output · Issue #20166 · n8n-io/n8n · GitHub

Thanks for your help anyways @flominator!

1 Like

Yeah, I heard other people having the same problem. So I think it’s big.

Hi @timq,

Are the workflow execution only being done on the Cloud session?

If yes you might’ve reach the maximum size allowed on the session and you will need to refresh the page.

My recommendation is to do it using CTRL+SHIFT+R as it will ignore current cache.

Please let me know if this worked.

Thank you,

João Paixão

Hey João,

yes the executions are only being done in the Cloud session. But I don’t think the size of staticData in use is the problem, as no function node works. I pinned the threads that tackled this problem as the solution for this thread, if you are intersted.

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