https://bz.apache.org/bugzilla/show_bug.cgi?id=64080
Bug ID: 64080 Summary: Graceful shutdown does not occur for connected clients that have not yet submitted their request payload Product: Tomcat 9 Version: 9.0.27 Hardware: PC Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: carbatt...@hotmail.com Target Milestone: ----- Continuing from bug 62515, testing shows that graceful shutdown will occur if: - the request has reached the servlet - bindOnInit is set to false on Connector in server.xml - unloadDelay is set to sufficient high value on Context in context.xml The key point here is "the request has reached the servlet". The server will accept a connect SYN/ACK and still terminate the connection, resulting in error upstream. Expected behavior for Tomcat here would be to: 1. Either not accept the connect (as it is shutting down) Or 2. If accepted, wait unloadDelay/some_other_property period of time to receive the request and respond to it. To reproduce the error: SERVER - servlet with sleep of 30s - unloadDelay set to 60s - bindOnInit set to false Testcase: 1. Use HTTPUrlConnection urlConn.setDoInput (true); urlConn.setDoOutput (true); urlConn.setUseCaches (false); urlConn.setConnectTimeout(1000); //1 second urlConn.setReadTimeout(10000); // 10 seconds urlConn.connect(); At this point a succesful connection to Tomcat server has been established by the Java Client 2. Shutdown Tomcat server Tomcat will abort this connection 3. Submit request: OutputStreamWriter printout = new OutputStreamWriter(urlConn.getOutputStream (), charset); This will throw a IOException (SocketTimeOutException) -- 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