Peter Turcsanyi created NIFI-6317:
-------------------------------------
Summary: HandleHttpRequest timeout handling issues
Key: NIFI-6317
URL: https://issues.apache.org/jira/browse/NIFI-6317
Project: Apache NiFi
Issue Type: Bug
Reporter: Peter Turcsanyi
Assignee: Peter Turcsanyi
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)