From 31da3f1d8513b10d0449a1855fbad5060bd6191d Mon Sep 17 00:00:00 2001 From: Milind Changire Date: Mon, 9 Apr 2018 11:26:05 +0530 Subject: rpc: set listen-backlog to high value Problem: On node reboot, when glusterd starts volumes rapidly, there's a flood of connections from the bricks to glusterd and from the self-heal daemons to the bricks. This causes SYN Flooding and dropped connections when the listen-backlog is not enough to hold the pending connections to compensate for the rate at which connections are accepted by the RPC layer. Solution: Increase the listen-backlog value to 1024. This is a partial solution. Part of the solution is to rearm the listener socket early for quicker accept() of connections. See commit 6964640a977cb10c0c95a94e03c229918fa6eca8 (change 19833) Change-Id: I62283d1f4990dd43839f9a6932cf8a36effd632c fixes: bz#1564600 Signed-off-by: Milind Changire --- rpc/rpc-transport/socket/src/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rpc') diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c index a000b26e515..34bdbdea9d0 100644 --- a/rpc/rpc-transport/socket/src/socket.c +++ b/rpc/rpc-transport/socket/src/socket.c @@ -4794,7 +4794,7 @@ struct volume_options options[] = { .description = "This option uses the value of backlog argument that " "defines the maximum length to which the queue of " "pending connections for socket fd may grow.", - .default_value = "10", + .default_value = "1024", }, { .key = {"transport.tcp-user-timeout"}, .type = GF_OPTION_TYPE_INT, -- cgit