https://bz.apache.org/bugzilla/show_bug.cgi?id=62515
Bug ID: 62515 Summary: Tomcat should perform a graceful shutdown Product: Tomcat 8 Version: 8.0.x-trunk Hardware: PC Status: NEW Severity: enhancement Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: k...@semler.dk Target Milestone: ---- Tomcat does not shutdown as other Java servers do. Usual java server shutdown practice: 1. Stop listening on inbound port 2. Finish executing all existing requests based on X timeout 3. Shutdown server Tomcat does this: 1. Finish executing all existing requests based on unloaddelay timeout 2. Stop listening on inbound port 3. Shutdown server Due to tomcat still listening on inbound port it will accept requests to the end, which are then terminated, as they do not have sufficient time to finish, regardless of the value set for unloaddelay attribute. Furthermore, it is impossible for any loadbalancer, reverse proxy, etc upstream to know that the tomcat is shutting down. For other java servers, because the inbound port is closed, the upstream cannot connect and behaves according to its purpose & configuration (for example send new requests to another server). So in conclusion, by stopping the inbound port first thing, we can ensure existing request completing successfully as well as allowing upstream components to know that the server is not available for new requests. To produce this problem, you need a simple servlet with a long response time. Invoke it, request shutdown of server, invoke it again. Depending on unloaddelay value, either both requests will fail or the last request will fail. -- 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