Flow constantly running

All of a sudden my workflows are just ‘running’. They’re all based on web hooks, when I send the workflow to the test url it and watch it - it works fine. When I send it to the live URL, the expected actions of the workflow are running but it’s constantly stuck in this ‘running’ state and that ID number of the execution keeps going up and up until I pm2 kill n8n.
I’ve upgraded N8N, recreated the workflow, but it’s happening with every workflow now. Any ideas?

Update:
I’m unable to stop those executions - it just comes up with an error. If any of them do retire, the status changes to ‘unknown’ and I’m unable to open the execution.

Quite strange. What version of n8n are you running?

Panic over! I haven’t broken N8N! :relieved:
One of the webhooks from another app was returning an error but with a 200 code, presumably confusing n8n. Strange that it kept trying new executions though, it once went up to 20,000 executions, but they’ve thankfully gone after restarting n8n

I am happy that you figured out the issue. I would suggest you add an IF node that checks for the incoming response from that service. If the incoming response is something that you need you can continue the workflow, otherwise stop the execution.

2 Likes

I always do this for my workflow.

In my use case:

IF Node will be quite helpful when you check payments status from WooCommerce Trigger, Because it’ll directly process the flow without checking the payment status.

Here is what I did. Once the Trigger starts. I’ll wait for 30 Seconds (Title says 2 mins lol. I didn’t changed) the WooCommerce Node will check for the Payment status with the Order ID got from the Trigger.

IF Node checks the payment status. If PAID, It goes to True branch. If False, then It runs again. (I divided the IF node into two parts. Check Status is for Cancelled Order)

Imagine, If the Cancelled order keep running the workflow. :frowning_face:

:crown: IF node is king

1 Like

Thanks @harshil1712 , it was actually a loop in the python app that continously sent back json packages to N8N. Unfortunately the json being sent was always the same but used the IF function in the python app instead. IF statement has been really helpful though, I avoided it as kept getting notifications of failed workflows until I found the ‘DO NOTHING’ node. N8N rocks! :love_you_gesture:

1 Like

Thank You very much for sharing this.

AYM

Can you share this node mate?

1 Like

Hi @mahesh_bathina

Here you go. :smile:

1 Like

Is there any way to stop the ones that are already constantly running?
I put the if statement in the flow at the beginning to stop future ones, but I still have a bunch that say they are running.
Ive tried hitting the “stop execution” button but it gives an error saying it cannot find the ID.
I have also tried ‘docker compose down’ and ‘docker compose up -d’ again to see if that would kill it, but it did not.

Any other thoughts?

They are not actually running, n8n just thinks they are running, probably because n8n never saved a “successful” or “failed” status for them.

afaik the only way to remove them is to delete those executions from the database.

2 Likes

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