[issue38699] socket: change listen() default backlog from 128 to 4096?

STINNER Victor report at bugs.python.org
Fri Feb 7 05:35:05 EST 2020


STINNER Victor <vstinner at python.org> added the comment:

There is no clear consensus to change socket.listen() default backlog, so I close the issue.

> Anyway asyncio at least should probably update its default.

If someone cares, please open a separated issue ;-)

> To be clear: I do still think that using a large value by default, and clamping user input values at 65535, would be improvements. I just don't think they're important enough to spend energy arguing about it :-).

I dislike having to workaround operating system bugs. If the function misbehaves, I would prefer to see the OS being fixed, than Python trying to guess which value is supposed to work or not.

       int listen(int sockfd, int backlog);

backlog type is an int: its maximum value is INT_MAX. If the kernel rejects values larger than 65535, the kernel and/or the libc should reject such value.

----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38699>
_______________________________________


More information about the Python-bugs-list mailing list