After turning off the workflows, they are still being executed.
I had originally suspected it is an issue of kafkajs but it doesnt seem so as they can be seen in the execution history.
The workflow
It consists of just one kafka trigger and a kafka node which sends out messages during off hour
That is a bit odd, Are you using queue mode or is it just one instance of n8n? When you try to deactive the workflow does anything appear in the n8n log file?
I believe just one instance. I’ve never set any config for queue mode.
And the PATCH request to set active to false has always returned 200
Where should can the log file be checked?
The log is normally to console so I am not sure where NPM writes it console output, What you can do is enable file logging with the options on this page: Logging - n8n Documentation Would be interesting to pop it on then disable the worklfow and when it triggers again grab the workflow and we can take a look.
@Jon I havent been able to find anything useful from the debug logs, everything seems normal.
I have always disabled the workflow from the UI, suspecting if it has something to do with database connection.
In some cases if I turn off Workflow 1 and Workflow 3 which have the same kafka topic as Workflow 2, I receive 3 responses from all of them.
When you say sharing the same database do you mean the same database and schema or just the same database server? I would only have multiple instances on the same database if you are using queue mode.
Jun 15 06:54:52 workflow-dev docker[901732]: 2022-06-15T06:54:52.845Z | verbose | Successfully deactivated workflow "13" {"workflowId":"13","file":"ActiveWorkflowRunner.js","function":"remove"}
Jun 15 06:55:05 workflow-dev docker[901732]: 2022-06-15T06:55:05.716Z | debug | Received trigger for workflow "Jennifer's (Authorised)" {"file":"ActiveWorkflowRunner.js","function":"returnFunctions.emi>
Jun 15 06:55:07 workflow-dev docker[901732]: 2022-06-15T06:55:07.370Z | debug | Received child process message of type start for execution ID 3051. {"executionId":"3051","file":"WorkflowRunner.js"}
Jun 15 06:55:07 workflow-dev docker[901732]: 2022-06-15T06:55:07.382Z | verbose | Initializing n8n sub-process {"pid":1306,"workflowId":13,"file":"WorkflowRunnerProcess.js","function":"runWorkflow"}
Jun 15 06:55:07 workflow-dev docker[901732]: 2022-06-15T06:55:07.683Z | verbose | Workflow execution started {"workflowId":13,"file":"WorkflowExecute.js","function":"processRunExecutionData"}
Jun 15 06:55:07 workflow-dev docker[901732]: 2022-06-15T06:55:07.687Z | debug | Received child process message of type processHook for execution ID 3051. {"executionId":"3051","file":"WorkflowRunner.js>
Jun 15 06:55:07 workflow-dev docker[901732]: 2022-06-15T06:55:07.688Z | debug | Executing hook (hookFunctionsPush) {"executionId":"3051","workflowId":13,"file":"WorkflowExecuteAdditionalData.js","funct>
Jun 15 06:55:07 workflow-dev docker[901732]: 2022-06-15T06:55:07.688Z | debug | Start processing node "Web Widget Trigger" {"node":"Web Widget Trigger","workflowId":13,"file":"WorkflowExecute.js"}
Jun 15 06:55:07 workflow-dev docker[901732]: 2022-06-15T06:55:07.689Z | debug | Received child process message of type processHook for execution ID 3051. {"executionId":"3051","file":"WorkflowRunner.js>
This is my logs after deactivating a workflow, it still runs anyway
So are both instances using the same database instance for storing workflows and n8n settings or is it just a database you are reading from in your workflows?
Did you restart both your instances after disabling your workflow? n8n would only read the active/inactive state when starting (or making changes in-app). So deactivating a workflow directly in the database (or through another instance writing to that database) won’t take effect if you have multiple instances in use.
To avoid such inconsistencies you’d need to provide each instance with its own database.