Unfortunately that does not tell us why yield was called.  But it likely
means the processor believes the queue it is talking with contains no
data.  The code shows that as the most likely culprit.

https://github.com/apache/nifi/blob/98aabf2c50f857efc72fd6f2bfdd9965b97fa195/nifi-nar-bundles/nifi-amqp-bundle/nifi-amqp-processors/src/main/java/org/apache/nifi/amqp/processors/ConsumeAMQP.java#L130-L133
                if (lastReceived == null) {
                    // If no messages received, then yield.
                    context.yield();
                }

Thanks

On Tue, Sep 26, 2023 at 9:48 AM Ivan Dolinin <idoli...@cleverdevices.com>
wrote:

> Adding log in text. Looks like the image didn’t go through.
>
>
>
> 2023-09-26 08:16:58,207 DEBUG [Timer-Driven Process Thread-7]
> o.a.nifi.amqp.processors.ConsumeAMQP
> ConsumeAMQP[id=78f68d05-f59d-3b9b-746e-5d480be723df] has chosen to yield
> its resources; will not be scheduled to run again for 1000 milliseconds
>
> 2023-09-26 08:16:58,207 DEBUG [Timer-Driven Process Thread-9]
> o.a.nifi.amqp.processors.ConsumeAMQP
> ConsumeAMQP[id=85c40dd5-3f41-3895-25e9-ee3569331185] has chosen to yield
> its resources; will not be scheduled to run again for 1000 milliseconds
>
>
>
>
>
> Ivan Dolinin / (416) 583-5833 x2012 / idoli...@cleverdevices.com
>
>
>
> *From:* Ivan Dolinin <idoli...@cleverdevices.com.INVALID>
> *Sent:* Tuesday, September 26, 2023 12:20 PM
> *To:* Joe Witt <joew...@apache.org>; dev@nifi.apache.org
> *Subject:* RE: Processor stuck in yielding
>
>
>
>
>
> Joe,
>
>
>
> thank you for a very quick response.
>
>
>
> Here is the screenshot of the log. There is nothing else recorded for the
> UUID 78f68d05-f59d-3b9b-746e-5d480be723df. I could not trace the beginning
> of this state. We have 3 ConsumeAMQP processors reading from RabbitMQ, only
> this one is yielding, other 2 reading messages as expected.
>
>
>
>
>
>
>
> Ivan Dolinin / (416) 583-5833 x2012 / idoli...@cleverdevices.com
>
>
>
> *From:* Joe Witt <joew...@apache.org>
> *Sent:* Tuesday, September 26, 2023 11:49 AM
> *To:* dev@nifi.apache.org
> *Subject:* Re: Processor stuck in yielding
>
>
>
>
>
> Ivan,
>
>
>
> Please show what the logs state specifically if you can.
>
>
>
> That processor could yield for the following reasons from a quick look:
>
> 1. The connection between it and the next processor in the flow is a full
> queue not being processed fast enough.
>
> 2. The data connection to AMQP is working but it is told there is no data
> currently to pull.
>
> 3. ...
>
>
>
> That is about it actually.  I am looking at the current code though.  NiFi
> 1.8.0 is 5 years old (today ironically) and that processor and the
> associated libraries and even framework have changed a lot since then.  You
> will definitely need to try your flow on the latest 1.23.x line if the
> issue being seen is not a simple config problem.
>
>
>
> Thanks
>
>
>
>
>
> On Tue, Sep 26, 2023 at 8:40 AM Ivan Dolinin <
> idoli...@cleverdevices.com.invalid> wrote:
>
> Hello,
>
> In one of our production instances running NiFi 1.8.0, the ConsumeAMQP
> processor is stuck in yielding. All the log is saying that it has chosen to
> yield. No errors are happening in the downstream processors. There are
> thousands of messages in the queue it is reading from. The processor is
> connecting to the queue.  What could be the reason?
>
>
> Thanks,
>
> Ivan Dolinin
>
>

Reply via email to