<div>Hi,<div><br></div><div>Please do not specify a fixed thread pool when you construct a ChannelFactory. &nbsp;Specify Executors.newCachedThreadPool() - then Netty will pull only small number of threads.</div><div><br></div><div>I'm not sure why the boss thread dies, but was there any exception logged or printed out to stderr?</div></div>
                <div><br>--&nbsp;<br><a href="http://gleamynode.net/">Trustin Lee</a><br></div>
                 
                <p style="color: #A0A0A8;">On Sunday, August 14, 2011 at 1:52 AM, deinlandel wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div>Hi, All.<br><br>I have Netty-based server application with around 1000 clients who connect<br>and disconnect frequently.<br><br>I use server bootstrap which is created as follows:<br>&lt;code&gt;<br>public static void main(String[] args) {<br>//....some initialization code.....<br>  ServerBootstrap bootstrap = new ServerBootstrap(new<br>NioServerSocketChannelFactory(<br>                Executors.newFixedThreadPool(Settings.getDemuxPoolSize()),<br>                Executors.newFixedThreadPool(Settings.getDemuxPoolSize()),                <br>Settings.getDemuxPoolSize()));<br>   bootstrap.setPipelineFactory(pipelineFactory);<br>   bootstrap.setOption("child.tcpNoDelay", true);<br>   InetSocketAddress addr =  new InetSocketAddress(address, port);<br>   bootstrap.bind(addr);<br>}<br>&lt;/code&gt;<br><br>The problem is my server app stops accepting new connections periodically,<br>so I have to restart it.<br>I've made a thread dump, analyzed it and found no "NIO Boss thread", which<br>accepts connections!<br>It seems that this thread has crashed.<br><br>Unfortunately, this is happening once per 5-6 hours, so it's hard to<br>reproduce. So my question is: what can cause death of the "NIO Boss thread"<br>(I thought that it never dies unless I shutdown Netty server bootstrap) and<br>how can I prevent it?<br><br>I have no other pointers to server bootstrap. Can garbage collection of this<br>object cause shutdown of NIO boss thread?<br><br>Any help will be appreciated.<br><br>P.S. Sorry for my bad English.<br><br>--<br>View this message in context: <a href="http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Netty-Boss-IO-Thread-dies-tp6683480p6683480.html">http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Netty-Boss-IO-Thread-dies-tp6683480p6683480.html</a><br>Sent from the Netty User Group mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>netty-users mailing list<br><a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/netty-users">https://lists.jboss.org/mailman/listinfo/netty-users</a><br></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>