Created 09-30-2021 10:04 AM
Hello,
I am facing an issue with MarkLogic Connector, some times the connection hangs for ever while writing records to Marklogic and we had to restart nifi server to resolve it. Is there a way to set timeout for the connection so that it should continue processing next records with new connection? It should retry or give up, we should not be expected to restart the server. are there any connection properties to handle this, i do not find any in the documentation ?
We are using NiFi Version 1.12.1 of Docker image and below Marklogic connectors.
DefaultMarkLogicDatabaseClientService 1.9.1.7
PutMarkLogic 1.9.1.7
Created 09-30-2021 01:17 PM
The individual components are responsible for handling any kind fo timeout related to execution of the components code. The NiFi Connections hold NiFi FlowFiles that the downstream processor component will consume from. Typically the FlowFile being executed upon by the downstream component is not removed from the inbound connection until the execution by that downstream connection is complete and its execution has resulted in the creation of its outbound FlowFile (which may be same as ingest FlowFile depending on what that processor does. This is done to protect against dataloss in the even the NiFi service crashes or shut down while a component is still executing. On NiFi service starting back up, the FlowFile would get loaded back in to the same upstream connection allowing the downstream processor to start over executing on the same FlowFile(s).
From you description, it sounds like these custom (not part of Apache NiFi or Cloudera distributions) components are becoming hun while executing against a FlowFile from the upstream connection?
When your flow is in this hung state, does the MarkLogic processor show a small number in the upper right corner of the processor indicating it has an active thread?
Or are you saying the the MarkLogic processor is not actively executing a thread and is not getting a thread to work on the next queued FlowFile? Did you execute "nifi.sh dump <dump-filename>" to verify there is no MarkLogic processor class threads executing?
Is it possible that your entire "Max Timer Driven Thread pool" is consumed by other components on your canvas at times preventing this processor from being able to get a thread to run?
If this turns out to not be a thread starvation issue, you may need to reach out to the author of these custom components for suggestions.
If you found this response assisted with your query, please take a moment to login and click on "Accept as Solution" below this post.
Thank you,
Matt
Created 09-30-2021 01:17 PM
The individual components are responsible for handling any kind fo timeout related to execution of the components code. The NiFi Connections hold NiFi FlowFiles that the downstream processor component will consume from. Typically the FlowFile being executed upon by the downstream component is not removed from the inbound connection until the execution by that downstream connection is complete and its execution has resulted in the creation of its outbound FlowFile (which may be same as ingest FlowFile depending on what that processor does. This is done to protect against dataloss in the even the NiFi service crashes or shut down while a component is still executing. On NiFi service starting back up, the FlowFile would get loaded back in to the same upstream connection allowing the downstream processor to start over executing on the same FlowFile(s).
From you description, it sounds like these custom (not part of Apache NiFi or Cloudera distributions) components are becoming hun while executing against a FlowFile from the upstream connection?
When your flow is in this hung state, does the MarkLogic processor show a small number in the upper right corner of the processor indicating it has an active thread?
Or are you saying the the MarkLogic processor is not actively executing a thread and is not getting a thread to work on the next queued FlowFile? Did you execute "nifi.sh dump <dump-filename>" to verify there is no MarkLogic processor class threads executing?
Is it possible that your entire "Max Timer Driven Thread pool" is consumed by other components on your canvas at times preventing this processor from being able to get a thread to run?
If this turns out to not be a thread starvation issue, you may need to reach out to the author of these custom components for suggestions.
If you found this response assisted with your query, please take a moment to login and click on "Accept as Solution" below this post.
Thank you,
Matt
Created 09-30-2021 02:03 PM
Thanks @MattWho for the quick response.
I can see the active thread in the top right corner of the processor which is hang forever. The max timer driven threads are not consumed, i will try to get the thread dump and see. I think i should contact provider of the processor (marklogic) as you suggested. Thank you.