mit*_*roo 6 linux connection gunicorn
在 gunicorn 应用程序中,我只需要允许一定数量的连接,并错误地拒绝其余连接。我有这个测试配置:
timeout = 60
graceful_timeout = 60
workers = 1
worker_connections = 1
backlog = 1
worker_class = "gevent"
max_requests = 1000
max_requests_jitter = 42
preload_app = True
bind = "0.0.0.0:8080"
loglevel = "debug"
accesslog = "-" # Send access log to stdout.
Run Code Online (Sandbox Code Playgroud)
我期望这会导致一次只接受一个连接并拒绝其余的连接。但是当我一次发送多个请求时,它们会被一一排队和处理。出于测试目的,处理一个请求需要 10 秒以确保有一个活动连接。
使用 gunicorn 版本 19.9.0