Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Who agreed with this solution

avatar
Super Mentor

@hegdemahendra 

The Service Unavailable response to a request received by the HandleHTTPRequest processor is most commonly the result of the FlowFile produced by the HandleHTTPRequest processor not being processed by a downstream HandleHTTPResponse processor before the configured Response Expiration configured in the StandardHTTPContextMap controller service.   This aligns with the shared exception you shared from the NiFi logs.  If you are seeing this exception prior to the 3 minutes expiration you set, it is possible your client is closing the connection due to some client timeout.  That you could need to look at your client sending the requests to get details and options.

You mentioned you have 4200+ processors that are scheduled based on their individual configurations.  When a processor is scheduled it requests a thread from the configured Maximum TimerDriven Thread Count pool of threads.  So you can see that not all processor can execute concurrently which is expected.  You also have only 8 cores so assuming hyper-threading you are looking at the ability to actually service only 16 thread concurrently.  So what you have happing is time slicing where all your up to 200 concurrently scheduled threads are gets bits of time on the CPU cores.  Good to see you looked at your core load average which is very important as it helps you determine what is a workable size for your thread pool.  If you have a lot of cpu intensive processor executing often, your CPU load average is going to be high.  For you I see a good managed CPU usage with some occasional spikes.

I brought up above as it directly relates to your processor scheduling.  The HandleHTTPRequest processor creates a web server that accepts inbound requests.  These request will stack-up within that web service as the processor executed threads read those and produce a FlowFile for each request.  How fast this can happen depends on available threads and concurrent task configuration on HandleHTTPRequest processor scheduling tab.   By default an added processor only has 1 concurrent task configured.  If you set this to say 5, then the processor could potentially get allocated up to 5 threads to process request received by the HandleHTTPRequest processor. 

Thought here is you might also be seeing service unavailable because the container queue is filling faster then the processor is producing the FlowFiles as another possibility.

Hope this information helps you in your investigation and solution for you issue.

If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

View solution in original post

Who agreed with this solution