On Mon, 2012-06-25 at 09:51 -0700, Rossen Stoyanchev wrote:
> Thanks for your response, Oleg!
> 
> Setting defaultMaxPerRoute and maxTotal on the 
> PoolingClientAsyncConnectionManager allowed me to create a large number of 
> concurrent requests. Up to about 4000 it runs well. Going to 5000 (I was 
> trying to get to 10,000 to see where the boundaries are) results in the 
> following exception:
> 
> Exception in thread "I/O dispatcher 2" java.lang.NoClassDefFoundError: Could 
> not initialize class sun.nio.ch.FileDispatcher
>       at sun.nio.ch.SocketDispatcher.preClose(SocketDispatcher.java:41)
>       at 
> sun.nio.ch.SocketChannelImpl.implCloseSelectableChannel(SocketChannelImpl.java:709)
>       at 
> java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel(AbstractSelectableChannel.java:201)
>       at 
> java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:97)
>       at 
> org.apache.http.impl.nio.reactor.IOSessionImpl.close(IOSessionImpl.java:215)
>       at 
> org.apache.http.impl.nio.reactor.AbstractIOReactor.closeActiveChannels(AbstractIOReactor.java:544)
>       at 
> org.apache.http.impl.nio.reactor.AbstractIOReactor.hardShutdown(AbstractIOReactor.java:579)
>       at 
> org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:309)
>       at 
> org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106)
>       at 
> org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:601)
>       at java.lang.Thread.run(Thread.java:662)
> 
> Are there any other settings to consider when processing a large number of 
> concurrent requests? The specific scenario I'm testing with is reading JSON 
> responses (about 2K each) where each response takes about a second to 
> complete (i.e. the test server holds for a second before returning). 
> 
> Thanks,
> Rossen
> 


Generally java.lang.NoClassDefFoundError indicates a classpath /
application configuration / deployment problem. So, this really does not
look like an issue with HttpAsyncClient.

The error appears to be caused by some internal error in the JRE NIO
implementation code. You might want to try upgrading / downgrading your
JRE to a more stable version. 

Oleg 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to