You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Mark Payne (JIRA)" <ji...@apache.org> on 2016/07/20 18:51:20 UTC

[jira] [Commented] (NIFI-2268) HandleHttpRequest can use too many tasks and CPU

    [ https://issues.apache.org/jira/browse/NIFI-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15386425#comment-15386425 ] 

Mark Payne commented on NIFI-2268:
----------------------------------

I think I would avoid calling context.yield() as that will result in delaying web requests by 1 second by default. This will result in pretty poor latency for most web requests by default. An alternate approach would be change the BlockingQueue.poll() call to use BlockingQueue.poll(10, TimeUnit.MILLISECONDS) - this will avoid crushing the CPU but will not cause 'artificial latency'.

> HandleHttpRequest can use too many tasks and CPU
> ------------------------------------------------
>
>                 Key: NIFI-2268
>                 URL: https://issues.apache.org/jira/browse/NIFI-2268
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 0.7.0
>            Reporter: Michael Moser
>            Priority: Minor
>
> With the default settings of HandleHttpRequest, user reports 100% CPU usage and millions of scheduled tasks.  When this processor doesn't have work to do, its onTrigger() should call ProcessContext.yield().  This is how the ListenHTTP processor works, so it's an established pattern.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)