Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Long running request timeouts

Thanks, Greg.  I'm a bit worried about how setting up a timeout and interrupting the processing thread would act when all those threads live in a pool and are constantly re-used.  The async servlets suggestion is probably worth investigating though, even though it would likely be a larger time investment to pull off.

Thanks,
Spencer

On Thu, Dec 10, 2015 at 3:17 PM, Greg Wilkins <gregw@xxxxxxxxxxx> wrote:
Spencer,

There is nothing you can totally at the jetty level as the servlet spec does not allow jetty to interrupt a dispatched thread.  

Depending on you application, you could also try writing a simple filter that remembers the thread that it passed on through the chain and it can attempt to apply a timeout and do the interrupt.   If your handling is interruptible, this simple approach could work.

But many are not interruptible.  However, you could perhaps look at async servlets - using request.startAsync(),  Then you can disassociate the thread handling the response from the thread that generates the response.

cheers

--

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top