https://bz.apache.org/bugzilla/show_bug.cgi?id=62982
Bug ID: 62982
Summary: Tomcat is not waiting for async requests to complete
their work on shutdown
Product: Tomcat 7
Version: 7.0.92
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
I am heavily using asynchronous API in my application, which is running on
Tomcat 7. One of the requirements that I have -- permit all requests that are
currently in flight to complete their work before termination.
I have the following properties set for each of my connectors in server.xml:
asyncTimeout="40000"
executorTerminationTimeoutMillis="60000"
I have thrown a 10 seconds sleep into one of my services and I place a curl
request against my server, then immediately I request a shutdown of a tomcat
service.
curl sits there for about 10 seconds and then it returns 502 from tomcat.
Additionally, in catalina.out, I see the following stack trace:
INFO: Waiting for 1 instance(s) to be deallocated for Servlet [jersey-servlet]
Dec 05, 2018 7:13:37 PM org.apache.catalina.connector.CoyoteAdapter
checkRecycled
INFO: Encountered a non-recycled request and recycled it forcedly.
org.apache.catalina.connector.CoyoteAdapter$RecycleRequiredException
at
org.apache.catalina.connector.CoyoteAdapter.checkRecycled(CoyoteAdapter.java:634)
at
org.apache.coyote.http11.AbstractHttp11Processor.recycle(AbstractHttp11Processor.java:1909)
at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.release(Http11NioProtocol.java:220)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:720)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1775)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1734)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
I believe it indicates that something is not working as expected: seems like
HTTP connectors are being shut down prematurely.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]