Stop execution from terminal

Good day,

I have a workflow with a “code” node that has been using 100% of the CPU for a while, so I can’t access n8n.

I tried deactivating the workflow with the terminal using docker exec -u node -it n8n-container n8n update:workflow --id=<ID> --active=false but it’s not finishing the active execution.

Is there a way to solve this?

I don’t want to restart the container, as I have active workflows waiting for a specific date and they will fail.

Thank you.

PS: Is there a better way of testing these functions so they don’t use 100% of the CPU and block n8n?

Hi @illusionandcards, I am afraid n8n does not have a CLI option to stop individual executions from running.

I don’t want to restart the container, as I have active workflows waiting for a specific date and they will fail.

I am afraid restarting the container would be the suggested approach here. Workflows waiting for more than 65 seconds would be persisted to the database for the duration of the wait though, so these should still be available after the restart.

2 Likes

Yes they persisted, so I had no problem when restarting the container. Thanks!

1 Like

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