Closed mobamoba closed 1 week ago
Could you add some more descriptions please, the video won't play for me in either chrome or firefox
Yeah the max upload size is 10MB so I had to convert the video to h265 to shrink it - I guess browsers won't play that? I'll try to re-upload later but basically the status in the Delay node just keeps going up and up and up and wouldn't stop until I deleted the node. Also there was a weird very long - like close to a minute - delay between the node before (a switch) and the delay node "noticing" that it had been sent a message.
@mobamoba is this all Delay nodes or just this one in particular? Are you passing lots of messages to it or just one? Any more context you can provide would be helpful. Your video does should the number going up, but without any more information about the flow, it's not a lot to go on.
One delay node, one message, triggered only once. And there was nothing else to go on. I literally just inserted the delay node, deployed, hit the prior switch, and that's what happened. Here's a video which hopefully plays:
https://github.com/node-red/node-red/assets/11135869/ae86ba4d-ff55-4f15-9bca-cf536fcc0f9b
@mobamoba the status is a count of messages queued.
It looks to me like you have an uncontrolled loop in your flows.
This is easy to prove by adding a debug node BEFORE the delay node.
Demo
I understand, but the reason I was reporting it as a bug is that when I deleted the Delay node and simply replaced it with a new one for the exact same amount of time in the exact same place in the flow with no other changes, it worked fine and exactly as expected with the status count operating as expected.
That would depend on what type of deploy you did (full deploy? Flow deploy? Modified node deploy?)
If you did full or modified flow deploy you will interrupt the loop and all queued messages in the replaced delay node are destroyed.
The condition in your flow that triggers the loop will likely return when the right conditions are met.
As far as I can see, this is a flow design issue not a bug.
@mobamoba I am 99% certain you just have a latent issue in your flows that upon certain conditions, causes an uncontrolled message loop.
Off the top of my head: if you did a "modified flows" deploy that reset internal state of a node that was meant to "control your loop" and messages are still in transit (via MQTT/link nodes/etc), it may be possible to get into this situation. But that in its self is the reason I always try to convince users of NR not to create loops as they can lead to uncontrolled loops and there is almost always a "better way" than having a loop in your flows - but TBH, the Node-RED forum is the right place to discuss that sort of thing anyhow.
I will close this issue for now but please feel free to re-open it if you can produce a repeatable demo a set of steps that recreate the issue you are seeing.
Current Behavior
Because pictures is worth a thousand
https://github.com/node-red/node-red/assets/11135869/bac2b185-4b00-4935-bc2d-c224448101bc
words, I've attached a video showing what was going on. I've never seen this behavior before nor was I doing anything strange - literally I just dragged in a Delay node and set it for 10 minutes and that was it.
Expected Behavior
No response
Steps To Reproduce
No idea as I have no idea why this happened at all.
Example flow
Environment