Closed alanwang93 closed 4 years ago
This is expected. The sync worker doesn't handle keep-alive, it's designed for fast request and close them every time. Also if a request is too long and maintain a worker alived above the timeout, the gunicorn will be killed: https://docs.gunicorn.org/en/stable/design.html#server-model
Hope it helps :)
Hi, I'm using
ab
to test my serving, the command is likewhere
-k
means keep-alive.The problem is, if the connection lasts for more than
timeout
(thetimeout
argument in gunicorn), a timeout error will be raised. Before the error, the service works well and can handle a request within 2s.gthread
mode, the problem disappears.-k
in ab command, the problem disappears.It seems that if
ab
's connection lasts longer thantimeout
, the worker will be killed.