New submission from Charles-François Natali:

Having to pass an explicit backlog value to listen() is a pain: most people 
don't know which value to pass, and often end up using a value too small which 
can lead to connections being rejected.
For example, if you search throughout the standard library, you'll see many 
different hard-coded values.

The patch attached uses a default value of SOMAXCONN for socket.listen(): it 
should give a good default behavior (that's what golang does for example: in 
fact they go even further by checking the runtime value from 
net.core.somaxconn).

A second step would be to update the codebase to remove explicit backlogs 
(unless specific case).

----------
components: Library (Lib)
files: socket_listen.diff
keywords: patch
messages: 218121
nosy: haypo, neologix, pitrou, sbt
priority: normal
severity: normal
stage: patch review
status: open
title: add default backlog to socket.listen()
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file35186/socket_listen.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21455>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to