https://bz.apache.org/bugzilla/show_bug.cgi?id=63003

--- Comment #2 from Mark Thomas <ma...@apache.org> ---
Created attachment 36335
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36335&action=edit
Proposed fix for Tomcat 9.0.x v1

This is going to be a little trickier to solve than might be expected. The main
cause of the complication is that there isn't a simple mapping between web
applications and in-flight async requests.

There are other complications:
- requests can move between sync and async multiple times during their
execution
- the unload delay is currently applied to each Servlet in turn

The proposed solution attempts to solve this by:
- providing a mechanism for the timeout task to timeout any async requests for
stopped web apps
- tracking the number of in-flight async requests per web application so that
the web application stop process can be paused (for up to unloadDelay
milliseconds) to allow those asyncRequests to complete

Async requests that continue past the unload delay will be timed out. Given
that the web application may have been stopped by that point, the timeout is
likely to experience exceptions.

I'm providing this patch to solicit feedback. I'll probably come back to this
after the holidays.

My current expectation is that this would be back-ported to 7.0.x and 8.5.x.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to