Max08
Max08

Reputation: 1025

How does the timeout setting for gunicorn works?

The documentation for gunicorn says the following about --timeout setting. "Workers silent for more than this many seconds are killed and restarted." What do we mean by silent here. What if our app does not get a request for 2 days. Would this initiate a worker shutdown? We have a flask app that serves only 5 users and those users might connect once a week.

Upvotes: 5

Views: 6659

Answers (1)

oppressionslayer
oppressionslayer

Reputation: 7204

It looks like in reality it actually kills the worker that received a request but hasn't completed within time period as provided by timeout parameter rather than one just waiting for work. Here's a stackoverflow question that i think may help:

gunicorn doesn't kill worker even after timeout

Upvotes: 6

Related Questions