java.net.ConnectException thrown

Thomas Bocek bocek at ifi.uzh.ch
Wed Sep 16 18:38:13 EDT 2009


Hi J.,

This might be a limitation of the OS. If you are using for example
Linux, then you can only open about 1000 connections before seeing "too
many open files in system" error messages. You can adjust the value in
/etc/security/limits.conf

Thomas

J. Mi wrote:
> All,
> 
> I get following exception pretty consistently when trying to concurrently
> connect about 800 connections.
> 
> Any idea? Is this something out of Netty's control? If so, is there some
> configuration I could do to JVM or operating system to increase resource
> capacity?
> 
> Thanks,
> Jason
> 
> java.net.ConnectException: Connection refused: no further information
>         at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
>         at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
>         at
> org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.connect(NioClientSocketPipelineSink.java:381)
>         at
> org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.processSelectedKeys(NioClientSocketPipelineSink.java:351)
>         at
> org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.run(NioClientSocketPipelineSink.java:273)
>         at
> org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:113)
>         at
> org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:53)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Unknown Source)
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> netty-dev mailing list
> netty-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-dev


More information about the netty-dev mailing list