There is no support for decoding any dictionary supplied on the command
line. The only way to supply a dictionary logging config is through the
configuration file.
Close#1909.
Pylint 2.6.0 added a new rule to encourage chaining exceptions. Until
someone has time to address the new warnings, disable the rule to avoid
breaking the build.
we were trying to enforce the content length when the websocket
key was received but we should instead rely on the headers provided in
the request. Enforcing the expectation of the content length should be
done by the client side not by us.
Changes:
* remove content-length header enforcing in message.p when the
"Sec-WebSocket-Key1" header was found
Running gunicorn project.app while having a file called gunicorn.conf.py
in the current directory will read configuration from that file and actually fail
if the file raises an exception.
Fix graceful shutdown behavior so that clients receive notice to close
the connection.
After #2304 and the follow-up in ebb41da, Joe Kemp noticed that, while
the new behavior would successfully indicate a connect close after
hitting the maximum request limit for a worker during graceful shutdown,
the worker would not indicate a connection close if if it had not hit
the maximum request limit.
This change ensures that the worker exits gracefully when hitting the
request limit and also indicates to clients that the connection should
close once the shutdown begins.
All worker types should force a connection close after a request that
exceeds the max requests. A worker only needs to log about the automatic
restart once, rather than once for each keepalive request.
A couple of socket operations can fail with ENOTCONN error if the
other side of the connection is not connected anymore. In that case,
let's not crash the whole worker and give a chance to accept new
connections.
In my case, the operation that sometimes fails is a "getpeername()",
which was introduced in b07532be752668be5eb5dbd0a8303abf5c219c99
(v19.8.0). Someone in https://github.com/benoitc/gunicorn/issues/1913
metionned that v19.7.1 was working fine so it matches.
Fixes#1913