3

I am using a fixed Thread pool of size 8 for the Netty Worker Executor. I tried to send same curl requests again and again to the server. I find that my curl requests hang after about 7 or 8 times consistently. I tried to increase the Worker Executor pool size to about 16 and I was able to do more curl requests than earlier but still hangs after about 15 to 18 times. These are my questions:

  1. Is their a minimum limit for the Worker Executor thread pool size internal to Netty?
  2. Is the number of Netty I/O Workers same as the worker Executor thread pool size?
  3. If not how are these two sizes related ?

Thanks, Sudha

1
  • It sounds like your threads are hanging and not terminating, and your incoming requests are blocking on waiting for a thread to become available. Aug 8, 2013 at 18:02

1 Answer 1

1

You should use Executors.newCachedThreadPool() and limit the number of workers with the int in the *ChannelFactory instance

2
  • Yes sure I will try that. But can you explain me why FixedThreadPool() should not be used? We are trying to remodel Voldemort server's NIO stack using Netty. The current design uses fixed number of nio selectors. So we wanted to compare both the models. Aug 10, 2013 at 0:49
  • 1
    Because Netty will not release threads until the ChannelFactory is shutdown. Aug 10, 2013 at 12:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.