[jetty-user] Http request timeout?

Something Something <[email protected]> Sun, 12 Feb 2012 22:08:19 -0800
Newsgroups gmane.comp.java.jetty.support
Message-ID <CAHXz3_HPYroXHqLOfv5cVpti9UkCUDr_tqrPJ3U5RP5cBXLj3A@mail.gmail.com>
I have developed an application using Jetty.  It's working well, but
sometimes processing incoming requests such as GET, POST take too long
because of the slowness in the business layer.

We have decided that if a request is taking too long we will terminate the
request.  To accomplish this I need to add a timeout to all the incoming
http requests.  I tried doing this:

        jetty = new Server(port);
        Connector connector = jetty.getConnectors()[0];
        connector.setMaxIdleTime(5000);

thinking that this will timeout all the http requests after 5 seconds, but
it's not working :(


How do I timeout the httprequest in Jetty?

Thanks for your help.