PDA

View Full Version : Servlet 3.0 implementation --- AsyncContext timeout


baoqinye
10-07-2010, 09:12 PM
Hi,

We are testing the Servlet 3.0 implementation in Resin 4.0.10 (open source version) here. We use AsyncContext.setTimeout() to set the timeout to be 10 seconds. We then add an AsyncListener to catch the timeout notification. However, the timeout mechanism did not seem to work.

After investigating further, we found that Resin seemed to check timeout only once a minute. Because of that, it could take up to 1 minute + [timeout setting] to get the timeout notification depending on the time the request comes in.

We performed the same test in Tomcat and Tomcat seems to handle it properly (timeout notification sent after [timeout setting] has reached).

Is this considered a bug in Resin 4.0.10?

Thanks

Jenny

emil
10-07-2010, 10:08 PM
Hi Jenny,

I've filed this as a bug:

http://bugs.caucho.com/view.php?id=4249

I think the current behavior is technically allowed by the spec, but in reality, you'd want the timeout to be much sooner.

Thanks,
Emil

baoqinye
10-07-2010, 10:38 PM
Thanks Emil.

We also noticed that if we try to do "System.out.println()" in "AsyncListener.onTimeout()", we will not see anything printed out in System.out although we can get the System.out output in other classes. We will see the output if we do logger.info() though.

Thanks

Jenny