https://issues.apache.org/bugzilla/show_bug.cgi?id=53061
Bug #: 53061 Summary: tomcat asynchronous invocation problem Product: Tomcat 7 Version: 7.0.25 Platform: Other OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: vyacheslav.trai...@playtech.com Classification: Unclassified Created attachment 28581 --> https://issues.apache.org/bugzilla/attachment.cgi?id=28581 a simple test reproducing the problem We encountered a problem during asynchronous operations (tomcat7 with servlet 3). Description: One client continuously sends post requests to the server. On the server side for each request created AsyncContext with timeout 20 seconds: AsyncContext asyncContext = req.startAsync(req, resp); asyncContext.setTimeout(20000); As expected after approximately 20 sec the requests are completed. Then another client also begins to send requests to the server but in this case they are explicitly completed after 500 milliseconds. Something like this: AsyncContext asyncContext = req.startAsync(req, resp); asyncContext.setTimeout(20000); try { Thread.sleep(500); } catch (Exception e) { } asyncContext.complete(); The problem is that after running the second client all requests that are waiting for timeout (from the first client) are stuck and not released (onTimeout method of AsyncEvent is not called) until the second client stops sending requests. It looks like the problem occurs on Linux but not on Windows. I attached a simple test that may help to reproduce this issue. The following servlet accepts URL parameter “complete”. When “complete=1” the request will be completed after 500ms. Otherwise the request will wait till timeout (20 seconds). Run client that periodically sends requests to /servlet?complete=0. (I have tested it with 10 parallel threads that run in a loop) Then run another client that periodically sends requests to /servlet?complete=1 (This client can use only a single thread) See that the first client does not receive any responses while the second client is running. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- 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