Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] How to use async processing with 3.1 async IO correctly?


On Fri, Nov 22, 2013 at 11:24 AM, Gaurav Kumar <gauravphoenix@xxxxxxxxx> wrote:
> I've been using servlet 3.0 async processing using Jetty 9.0.6.v20130930
> quite nicely- able to handle 7k+ concurrent connections on commodity
> hardware. Now that Jetty 9.1 is GA, I'm trying to use async IO on top of
> async processing.
> Essentially, in my worker thread which processes async context, instead of
> directly writing to output stream, I've set WriteListener which in turn
> writes to output stream. The problem is that after processing few requests,
> Jetty is not accepting new connections- it kind of hangs. Existing client
> connections eventually time out.
> Is there a sample code available somewhere which shows how to use async
> processing with async IO?
> If we take this code as an example-,
> I'm modifying line #42 -
> asyncContext.getResponse().getWriter().printf("ticker: %s, price: %.2f",
> ticker, price);
> and replacing it with
> ServletOutputStream out = response.getOutputStream();
> out.setWriteListener(new StandardDataStream(content,async,out));
> (as mentioned in this
> example-
> but as I mentioned, after processing few requests, Jetty becomes
> unresponsive.
> Any pointers on how to resolve this issue?

You have a fully reproducible test that we can look at (full code) ?

Simone Bordet
Developer advice, training, services and support
from the Jetty & CometD experts.
Intalio, the modern way to build business applications.

Back to the top