Re: [jetty-user] requests hanging, then behaving normally for 30 seconds, then hanging
Alexei Serov <[email protected]> Mon, 14 Nov 2011 19:51:35 -0800
| Newsgroups | gmane.comp.java.jetty.support |
|---|---|
| Message-ID | <CAE=jfLbpOHCKe1jSH3hwkWsYrk9vCo+Do0er=x4ACu4MmvCE9g@mail.gmail.com> |
unsubscribe On Mon, Nov 14, 2011 at 6:53 PM, Greg Steffensen <[email protected]>wrote: > I'm seeing some odd behavior in a custom app that embeds Jetty. If a > server hasn't received a request recently, it will often take a very long > time to process the request- between 5 and 60 seconds- even for trivial > hello world handlers. Then, once that request has returned, the server > will process requests at a normal, rapid rate, for precisely 30 seconds, > and then the next request received will take a long time again. I'm > actually running two different custom webservers based on Jetty... they > share a lot of code, including the "hello world" handler that I'm testing > with. But only one is experiencing this problem, and the most significant > difference between the two that I can see is that the problematic one uses > BlockingChannelConnector, while the ok one uses the default > SelectChannelConnector. Other than the non-default Connector, I'm not > doing anything remotely interesting in the server setup- I'm not using any > Jetty XML files for configuration, and am essentially just doing a stock > > Server customServer = new CustomServer(PORT); > customServer.start(); > customServer.join(); > > I'm using BlockingChannelConnector for some servers because these server > variants should be receiving low numbers of persistent HTTP 1.1 > connections. The other SelectChannelConnector server (which functions as a > load balancer for the BlockingChannelConnector servers) will function as a > more normal webserver receiving requests from lots of clients, so > SelectChannelConnector seemed more appropriate. > > So- does anyone know if 30 seconds is the default value for any Jetty > settings that might be related to behavior like this? Or has anyone seen > similar behavior? >