From dcf5f78c258d62fe3611e688d015c89b5005e6b8 Mon Sep 17 00:00:00 2001 From: Michael Santos Date: Fri, 11 Oct 2013 10:49:37 -0400 Subject: [PATCH] listen: increase the default backlog to 128 Increase the default listenq to 128 (the standard max for most systems). Values exceeding the system limit are truncated to the system max. The behaviour of 0 and negative numbers is system dependent. UNP says about the backlog: Historically, sample code always shows a backlog of 5, as that was the maximum value supported by 4.2BSD. This was adequate in the 1980s when busy servers would handle only a few hundred connections per day. But with the growth of the World Wide Web (WWW), where busy servers handle millions of connections per day, this small number is completely inadequate. Busy HTTP servers must specify a much larger backlog, and newer kernels must support larger values. --- include/procket.hrl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/procket.hrl b/include/procket.hrl index 2f3e470..6d3504c 100644 --- a/include/procket.hrl +++ b/include/procket.hrl @@ -30,7 +30,7 @@ %% POSSIBILITY OF SUCH DAMAGE. -define(UNIX_PATH_MAX, 108). --define(BACKLOG, 50). +-define(BACKLOG, 128). -define(IFNAMSIZ, 16). % Max length of an interface device name including NULL