Too many open files error with Netty
Michael McGrady
mmcgrady at topiatechnology.com
Tue Oct 27 12:31:27 EDT 2009
Just so there is no misunderstanding: this exception is not obviously
due to the number of connections. I have not looked in the NioWorker,
but there is apparently a problem with protecting the HashMap from
concurrent access.
MG
On Oct 27, 2009, at 2:30 AM, Trustin Lee (이희승) wrote:
> Could you try r1846?
>
> — Trustin Lee, http://gleamynode.net/
>
>
>
> On Tue, Oct 27, 2009 at 5:42 PM, Albert Strasheim
> <fullung at gmail.com> wrote:
>> Hello Trustin
>>
>> 2009/10/27 Trustin Lee (이희승) <trustin at gmail.com>:
>>> I've just checked in the fix. The number of open files will not
>>> exceed (the number of open channels) + 128 * (the number of active
>>> ChannelFactories).
>>
>> I just tested with revision 1842 from Netty SVN, but there still
>> seems
>> to be a problem.
>>
>> After about 78000 connections on our Solaris box, I got the
>> following:
>>
>> Oct 27, 2009 10:39:12 AM org.jboss.netty.channel.socket.nio.NioWorker
>> WARNING: Unexpected exception in the selector loop.
>> java.util.ConcurrentModificationException
>> at java.util.HashMap$HashIterator.nextEntry(HashMap.java:848)
>> at java.util.HashMap$KeyIterator.next(HashMap.java:883)
>> at
>> org
>> .jboss
>> .netty
>> .channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:269)
>> at
>> org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:196)
>> at
>> org
>> .jboss
>> .netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:46)
>> at java.util.concurrent.ThreadPoolExecutor
>> $Worker.runTask(ThreadPoolExecutor.java:886)
>> at java.util.concurrent.ThreadPoolExecutor
>> $Worker.run(ThreadPoolExecutor.java:908)
>> at java.lang.Thread.run(Thread.java:619)
>>
>> Watching the heap in Visual VM also seems to indicate that it keeps
>> growing.
>>
>> Regards,
>>
>> Albert
>>
>> P.S. Code attached again.
>>
>> _______________________________________________
>> netty-users mailing list
>> netty-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/netty-users
>>
>>
>
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
Mike McGrady
Principal Investigator AF081-028 AFRL SBIR
Senior Engineer
Topia Technology, Inc
1.253.720.3365
mmcgrady at topiatechnology.com
More information about the netty-users
mailing list