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

Tamas Palfy updated NIFI-7314:
------------------------------
    Status: Patch Available  (was: In Progress)

> 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
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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)

Reply via email to