mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Merge pull request #2266 from lyft/fix_max_accept_in_gevent
Set `max_accept` on `gevent` worker-class to 1 when workers > 1
This commit is contained in:
commit
46b2cffaee
@ -76,6 +76,8 @@ class GeventWorker(AsyncWorker):
|
|||||||
else:
|
else:
|
||||||
hfun = partial(self.handle, s)
|
hfun = partial(self.handle, s)
|
||||||
server = StreamServer(s, handle=hfun, spawn=pool, **ssl_args)
|
server = StreamServer(s, handle=hfun, spawn=pool, **ssl_args)
|
||||||
|
if self.cfg.workers > 1:
|
||||||
|
server.max_accept = 1
|
||||||
|
|
||||||
server.start()
|
server.start()
|
||||||
servers.append(server)
|
servers.append(server)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user