gh-101225: Increase the socket backlog when creating a multiprocessing.connection.Listener (#113567)

Increase the backlog for multiprocessing.connection.Listener` objects created
 by `multiprocessing.manager` and `multiprocessing.resource_sharer` to
 significantly reduce the risk of getting a connection refused error when creating
 a `multiprocessing.connection.Connection` to them.
This commit is contained in:
Ronald Oussoren 2024-01-13 10:48:33 +01:00 committed by GitHub
parent 21f83efd10
commit c7d59bd8cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -156,7 +156,7 @@ class Server(object):
Listener, Client = listener_client[serializer]
# do authentication later
self.listener = Listener(address=address, backlog=16)
self.listener = Listener(address=address, backlog=128)
self.address = self.listener.address
self.id_to_obj = {'0': (None, ())}