ansible: bump UNIX listener default backlog, and set it to match forks.
The connection multiplexer can expect to not be scheduled at least until every $forks worker processes has attempted a connection, so the backlog must be able to hold every worker.
This commit is contained in:
parent
acf7fe56ee
commit
2647f73501
|
@ -50,6 +50,7 @@ import mitogen.service
|
|||
import mitogen.unix
|
||||
import mitogen.utils
|
||||
|
||||
import ansible.constants as C
|
||||
import ansible_mitogen.logging
|
||||
import ansible_mitogen.services
|
||||
|
||||
|
@ -204,6 +205,7 @@ class MuxProcess(object):
|
|||
self.listener = mitogen.unix.Listener(
|
||||
router=self.router,
|
||||
path=self.unix_listener_path,
|
||||
backlog=C.DEFAULT_FORKS,
|
||||
)
|
||||
self._enable_router_debug()
|
||||
self._enable_stack_dumps()
|
||||
|
|
|
@ -63,7 +63,7 @@ def make_socket_path():
|
|||
class Listener(mitogen.core.BasicStream):
|
||||
keep_alive = True
|
||||
|
||||
def __init__(self, router, path=None, backlog=30):
|
||||
def __init__(self, router, path=None, backlog=100):
|
||||
self._router = router
|
||||
self.path = path or make_socket_path()
|
||||
self._sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
||||
|
|
Loading…
Reference in New Issue