Like I said you may just block the EventLoop. Attach profiler and check if the 
EventLoop is blocked that is used by the SocketChannel.


> On 20. Jul 2017, at 10:42, Ronggen Liu <[email protected]> wrote:
> 
> Thanks, but I'm still confused why the server can't accept the connection 
> when the TCP 3-way handshake is completed.
> 
> On Thursday, July 20, 2017 at 4:12:31 PM UTC+8, Norman Maurer wrote:
> Hey,
> 
> comments inside…
> 
>> On 20. Jul 2017, at 08:50, Ronggen Liu <[email protected] <javascript:>> 
>> wrote:
>> 
>> Hello,
>> 
>> problem:
>> some connections were lost when there are too many clients were trying to 
>> connect to the server during a short time, for example, send out about 10k 
>> connections during about 3 seconds.
>> 
>> findings:
>> as i know, all the connections would be accepted in method doReadMessage of 
>> NioServerSocketChannel, and, in fact, we did find out that some connections 
>> were not accepted from there, but, actually, the TCP have been created 
>> successfully with completed 3-ways handsharke. 
>> meanwhile, we found, to some degree, we can avoid this issue by increasing 
>> the option SO_BACKLOG of ChannelOption, currently, we set it with 8, should 
>> be a little bit low.
> 
> 8 is most likely a way too low. I would not touch this setting at all if you 
> not want to increase it to a high-number.
> 
> 
>> 
>> questions:
>> how to handle this issue? as i know, the client should receive connection 
>> refused error when the number of the connections exceed the SO_BACKLOG, but 
>> the client didn't receive it.
> 
> No it will not receive a connect refused error but the connection will just 
> timeout. You should check if you block the EventLoop somehow and so not be 
> able to accept fast enough.
> 
> 
>> 
>> Thanks,
>> Gary
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Netty discussions" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/netty/3f5aae56-1fd6-4e0b-8a6e-cfed66653c1e%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/netty/3f5aae56-1fd6-4e0b-8a6e-cfed66653c1e%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Netty discussions" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/netty/bbccbf19-aa67-4346-83dd-566257893296%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/netty/bbccbf19-aa67-4346-83dd-566257893296%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netty/71FA5562-0694-4DE8-A31D-35F6F0467116%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to