Skip to content

Commit

Permalink
listen: increase the default backlog to 128
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
msantos committed Oct 11, 2013
1 parent 43a85fb commit dcf5f78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/procket.hrl
Expand Up @@ -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

Expand Down

0 comments on commit dcf5f78

Please sign in to comment.