-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
Hi Folks,
We are striving to simulate timeouts for the gthread
worker type. Previously, with sync, we could just put an sleep(gunicorn_timeout_in_secs+1)
to verify this behaviour and it worked flawlessly.
Using gthread workers even with 1 worker and 1 thread (test purposes) it doesn`t work.
We`re trying with the following command:
gunicorn app:api -t 3 -k gthread -w 1 --threads 1 -b 0.0.0.0:8000 --log-level DEBUG --error-logfile -
The following code illustrate the problem as well:
import falcon
import time
class QuoteResource:
def on_get(self, req, resp):
"""Handles GET requests"""
time.sleep(5)
quote = {
'quote': (
"I've always been more interested in "
"the future than in the past."
),
'author': 'Grace Hopper'
}
resp.media = quote
api = falcon.API()
api.add_route('/', QuoteResource())
With sync
worker, gunicorn have 1 timeout per request; with gthread
worker (1 worker, 1 thread) it just finish to process the request.
Components
We are using gunicorn==19.9.0.
Thanks in Advance.
Metadata
Metadata
Assignees
Labels
No labels