[
https://issues.apache.org/jira/browse/NIFI-6317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16847826#comment-16847826
]
ASF subversion and git services commented on NIFI-6317:
-------------------------------------------------------
Commit 2bfffd35b2d6785f6b15f4314b462a1430c6bc39 in nifi's branch
refs/heads/master from Peter Turcsanyi
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=2bfffd3 ]
NIFI-6317: HandleHttpRequest timeout handling issues
- set cleanup thread scheduling to 5 seconds in order to prevent stale request
staying in the cache for a long time
- disable timeout handling in HandleHttpRequest in order to prevent a new
flowfile being generated at request expiration
- use HttpServletResponse.SC* status codes everywhere in HandleHttpRequest, get
rid of importing javax.ws.rs
- add some more error logging to make bug investigations easier
- add a short message to 503 error responses to make bug investigations easier
This closes #3490.
Signed-off-by: Mark Payne <[email protected]>
> HandleHttpRequest timeout handling issues
> -----------------------------------------
>
> Key: NIFI-6317
> URL: https://issues.apache.org/jira/browse/NIFI-6317
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Reporter: Peter Turcsanyi
> Assignee: Peter Turcsanyi
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The request timeout can be configured on {{StandardHttpContextMap}} and
> expired requests are handled by a cleanup thread periodically.
> The scheduling of this thread calculated as 'request timeout / 2' which is
> quite infrequent if the user configures a higher timeout value (and even with
> the default 1 min too). The expired requests stay in the cache more time than
> necessary and new requests can be rejected because the cache is full.
> A shorter period should be used for the thread scheduling.
> The same timeout is used in {{HandleHttpRequest}} currently. Originally it
> was Long.MAX_VALUE, but it caused memory leak that has been fixed in
> NIFI-4858.
> On the other hand, the current timeout setting fires the request again when
> timeout expires (and before the cleanup thread could remove the request) and
> a new FF gets generated (which makes the situation even worse in a busy flow
> where timeouts occur).
> The timeout should be set to 0 which disables the timeout handling at all in
> {{HandleHttpRequest}} (no scheduler tasks will be generated).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)