Redis trigger node not executing or saving properly

Describe the problem/error/question

I’ve been running in to strange behavior for some of my Redis pub/sub workflows - I have a few cases where one update sent to a Redis channel causes several distinct workflows to execute via the Redis trigger node. As I’ve added more such workflows, I’ve noticed failures both in the UI behaving poorly (locking up while saving/activating; including workflow settings - e.g. setting a timeout/save properties), and when marked as active, some of the workflows don’t actually execute when I confirm a message was sent to the appropriate channel (and other workflows which trigger on the same channel, do execute).

I haven’t found any other posts about this issue with Redis, but it seems like it may be the same, or a very similar issue as was identified for the MQTT trigger here and fixed in PR-7498

I’ve counted and currently I only have 6 trigger nodes/workflows that subscribe to a Redis channel, so this does feel similar to the MQTT issue in that it can sometimes be fixed with a server restart, but problems arise as any workflow work/test executions take place.

The same pattern seems to exists for the Redis trigger, with this line being await manualTriggerFunction(); as opposed to void ....

Perhaps the same simple fix would work here? If so, it’d be good to see if the same holds true for any other queue/subscription type trigger nodes.

What is the error message (if any)?

From n8n’s console log:

(node:7) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added to [WebSocketPush]. Use emitter.setMaxListeners() to increase limit (Use `node --trace-warnings ...` to show where the warning was created)

From the workflow editor after attempting to activate a workflow in this condition:

Problem activating workflow

The following error occurred on workflow activation:
There was a problem activating the workflow: "Cannot read properties of undefined (reading 'triggerResponses')"

From the workflow editor after attempting to save a workflow in this condition:

Problem saving settings

There was a problem activating the workflow: "Cannot read properties of undefined (reading 'triggerResponses')" 

Please share your workflow

Share the output returned by the last node

N/A

Information on your n8n setup

  • n8n version: 1.17.1
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker-compose
  • Operating system: Ubuntu 22.04.3 LTS / aarch64

Hi @MutedJam - since you were part of the other thread for the MQTT issue, do you think you could see if this is a similar issue?

Hey @craSH,

That does sound like it could be similar although the issue with the MQTT node was around it not allowing any other workflows to be activated.

In your workflows are all of them using the same Redis channel or are they different channels? I would expect there to be some issues if you had say 6 workflows all pointing to the same redis channel but if you had 6 pointing at different channels it would be a bit different.

I will double check the node in the morning but it could be that it is blocking and we need to swap it to void as well.

In my case I have a few different channels that I’m monitoring - though I’m using wildcards on most of them, so I believe that ends up being PSUBSCRIBE? I’m not sure how that gets accounted for. In either case, my numbers are quite small.

Honestly, I end up restarting n8n when I run in to this, so I don’t know if the problem extends to being unable to start/activate other workflows. If I run in to it again, I’ll try and remember to toggle some unrelated workflows and report back, before restarting the server.

1 Like

Excited to see this change in the next version! I’ll report on if it improves things for me once it is in current, as I am still having issues with all nodes activating on redis triggers.

1 Like

I just wanted to share that this does appear to be fixed now, and all of my redis channel triggers are working reliably now!

1 Like

That is good to know thanks for the update.

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