Netty Boss IO Thread dies

deinlandel dein at hackerdom.ru
Sat Aug 13 12:52:19 EDT 2011


Hi, All.

I have Netty-based server application with around 1000 clients who connect
and disconnect frequently.

I use server bootstrap which is created as follows:
<code>
public static void main(String[] args) {
//....some initialization code.....
  ServerBootstrap bootstrap = new ServerBootstrap(new
NioServerSocketChannelFactory(
                Executors.newFixedThreadPool(Settings.getDemuxPoolSize()),
                Executors.newFixedThreadPool(Settings.getDemuxPoolSize()),                
Settings.getDemuxPoolSize()));
   bootstrap.setPipelineFactory(pipelineFactory);
   bootstrap.setOption("child.tcpNoDelay", true);
   InetSocketAddress addr =  new InetSocketAddress(address, port);
   bootstrap.bind(addr);
}
</code>

The problem is my server app stops accepting new connections periodically,
so I have to restart it.
I've made a thread dump, analyzed it and found no "NIO Boss thread", which
accepts connections!
It seems that this thread has crashed.

Unfortunately, this is happening once per 5-6 hours, so it's hard to
reproduce. So my question is: what can cause death of the "NIO Boss thread"
(I thought that it never dies unless I shutdown Netty server bootstrap) and
how can I prevent it?

I have no other pointers to server bootstrap. Can garbage collection of this
object cause shutdown of NIO boss thread?

Any help will be appreciated.

P.S. Sorry for my bad English.

--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Netty-Boss-IO-Thread-dies-tp6683480p6683480.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list