[jetty-user] requests hanging, then behaving normally for 30 seconds, then hanging
Greg Steffensen <[email protected]> Mon, 14 Nov 2011 21:53:32 -0500
| Newsgroups | gmane.comp.java.jetty.support |
|---|---|
| Message-ID | <CACOVy=pHk=XHwkuRNutmWCobkk4aa6sT5Gk9VCj=m9Og2EjO9A@mail.gmail.com> |
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?