You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Tamas Palfy (Jira)" <ji...@apache.org> on 2020/04/06 09:48:00 UTC

[jira] [Assigned] (NIFI-7314) HandleHttpRequest should stop Jetty in OnUnscheduled instead of OnStopped

     [ https://issues.apache.org/jira/browse/NIFI-7314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tamas Palfy reassigned NIFI-7314:
---------------------------------

    Assignee: Tamas Palfy  (was: Peter Turcsanyi)

> HandleHttpRequest should stop Jetty in OnUnscheduled instead of OnStopped
> -------------------------------------------------------------------------
>
>                 Key: NIFI-7314
>                 URL: https://issues.apache.org/jira/browse/NIFI-7314
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>            Reporter: Peter Turcsanyi
>            Assignee: Tamas Palfy
>            Priority: Major
>
> Jetty server is being stopped in {{OnStopped}} currently.
>  {{OnStopped}} runs only after the ongoing {{onTigger()}} calls have finished, but if the {{onTrigger()}} thread hangs up for some reason, {{OnStopped}} will never be called and Jetty won't be stopped (which would probably cease the hang-up in {{onTrigger}}).
> To avoid this possible hang-up: move the stopping logic from {{OnStopped}} to {{OnUnschedule}} which runs just after the user clicks Stop.
> Graceful shutdown could also be implemented: at the beginning of {{OnUnschedule}} wait for ongoing request to be finished for a while (with some timeout to avoid hang-up here). Also reject new requests in this period with HTTP 503 + "Server shutting down" response.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)