PS: this pauseNonContainerThread breaks CXF apps cause they synchronize an instance (AsyncResponseImpl) which potentially deadlock with tomcat cause of that. Would be nice to solve it in a manner not requiring all apps/libs to know that.
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <http://www.tomitribe.com> | JavaEE Factory <https://javaeefactory-rmannibucau.rhcloud.com> 2016-08-17 15:55 GMT+02:00 Romain Manni-Bucau <rmannibu...@gmail.com>: > Hi guys, > > I got several cases in prod where pauseNonContainerThread() get stucked > (ie the thread is blocked but no other thread is actually working and can > release it). > > I'm not really sure of the cause - I suspect some timeouts but can't > guarantee it. Just for information I'm using JAX-RS 2 @Suspended with CXF > which is built on top of Servlet 3 AsyncContext. > > Question is: can tomcat kind of enforce it to be released either using a > configurable timeout for this wait or something equivalent to avoid such a > case? Goal is to avoid as much as possible to fully lock the container in > the caller doesn't handle properly the async usage (hypothesis being tomcat > doesn't have a bug on that area). > > > Romain Manni-Bucau > @rmannibucau <https://twitter.com/rmannibucau> | Blog > <https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog > <http://rmannibucau.wordpress.com> | Github > <https://github.com/rmannibucau> | LinkedIn > <https://www.linkedin.com/in/rmannibucau> | Tomitriber > <http://www.tomitribe.com> | JavaEE Factory > <https://javaeefactory-rmannibucau.rhcloud.com> >