Hello All ,
We are facing an issue here. We are extracting some data from a database table using the "query database table processor" which runs every 15 minutes. This has been running fine but off late we have observed that the processor seems to show more than one active task which may be happening due to the case that the first task hasnt completed and the second task is getting triggered as a result of which we are getting duplicates in the target.
We also checked the "concurrent tasks" in the scheduling tab of the processor and this was set to 1. So , ideally we would assume that the processor would only show one Active task at a point in time. The screen shot is attached and the number of active tasks in the processor has been encircled and also the number concurrent tasks.
Can someone please shed some light here as its causing lots of issues for
One scenario where you can see 2 is when you selected to stop the processor while it is in the middle of executing and waiting to stop, so there is the 1 thread that is running processor, and the other thread that is waiting to stop it.
Thanks @Matt Clarke for your response. We are actually running on the primary node only . Yes we do have a 2 node cluster but all our source processors are set to primary node only. I have observed one behavior though , the primary node keeps on changing pretty often , could that be an issue and if that is an issue , is there a way to counter this .
Thanks @Bryan Bende for your response . Yes that may be a scenario , but we are definitely seeing this issue also on a processor that was running fine for the last 24 hours or so and all of a sudden it has seemed to get stuck and run multiple active tasks. Isnt there a way to force the processor to complete one task at a time and then only move onto another task ?
If the primary node is changing then it is likely that while the processor is in the middle of a long running execution, the primary node changes and the scheduling period is triggered on the new primary node, so now you have the processor executing on both nodes at the same time.
The primary node should only be changing when the current primary node has become unresponsive and the cluster coordinator has not heard from it for some period of time and then elects a new primary node. You may want to check for networking issues or possibly GC pauses or something that would frequently make a node unresponsive.
Thanks @Bryan Bende for this info. In your opinion , how often does a switch occur in a stable Nifi cluster ? In our case we are seeing this switch happening every after 40 minutes or .. is this normal ?