ClosedChannelException with concurrent connections - what am I doing wrong?
Nate Murray
nate at natemurray.com
Wed Aug 11 13:10:25 EDT 2010
Okay, it looks like somehow I am writing to a closed channel. However, I
don't see how this could be.
As is probably obvious by now, I'm a Netty newbie and I'm trying to figure
out if I should use Netty vs. going with erlang or a c-based server. I hear
a lot of good things about Netty, I think I just need to understand better
how it works.
I'm trying to build a simple but fast HTTP/REST server. I don't need tcp
keepalive or any sort of streaming to be supported.
A couple thoughts:
* Maybe my OrderedMemoryAwareThreadPoolExecutor is asking for too many
threads? Is 1000 too high?
* Do I get any benefit from setting my "backlog" option higher? What's a
reasonable value?
* Should I reuseAddress?
And this is my biggest question:
* Why do I receive a valid Channel in messageReceived but that Channel is
closed by the time I write to it in writeResponse?
I get about ~100 concurrent connections with the code above just fine. Am I
expecting too much of Netty asking for 500?
Setup:
Mac OS X, -Xmx2g, Netty 4.0.0.Alpha1-SNAPSHOT
Thanks,
Nate
--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/ClosedChannelException-with-concurrent-connections-what-am-I-doing-wrong-tp5394059p5413129.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list