3187 Commits

Author SHA1 Message Date
Benoit Chesneau
7a79808d96 update changeslog 2021-01-08 12:21:46 +01:00
Adam Johnson
6fd97b9559 Document that WEB_CONCURRENCY is set by, at least, Heroku 2021-01-06 03:14:31 +02:00
Adam Johnson
dad99a1bd4 Update gunicorn_ext.py 2021-01-06 03:14:31 +02:00
Adam Johnson
3273492811 Improve settings documentation
I was reading the documentation to configure another application successfully deployed with Gunicorn, and thought the documentation here could be improved a bit for clarity.

* Use code highlighting for the names, to indicate they are the names to use in the Python configuration file.
* Spell out the CLI flags and defaults with "Command line" and "Default" prefixes so it's clear what these are
* Consistently use Python syntax for the defaults, so the types may be more easily understood.
* Split multiple CLI flags with "or" rather than a comma, for clarity and easier copy-paste.
* Improve some descriptions, such as for ``raw_env`` and a header for "Server Hooks".
2021-01-06 03:14:31 +02:00
Randall Leeds
86eac4ce94
Merge pull request #2479 from benoitc/capture-peer-name
Capture peer name from accept
2020-12-31 11:24:11 -05:00
Randall Leeds
03c642e709
Merge pull request #2480 from kofrezo/update_docs_install
Update Debian and Ubuntu distribution information
2020-12-21 11:55:04 -05:00
Daniel Kröger
a4407abfa5 Default to Python 3 version of gunicorn in Stretch 2020-12-21 15:59:11 +01:00
Daniel Kröger
00e73b7e94 Update Debian and Ubuntu distribution information
- Recommend latest (supported) Debian and Ubuntu versions
- Update provided versions of gunicorn in Debian and Ubuntu
2020-12-21 15:59:02 +01:00
Nikita Sobolev
28a4c1b25e Typo fixed in the AsyncIO docs 2020-12-20 05:45:46 +02:00
Randall Leeds
d7ff60536d Add Python 3.9 to PyPI classifiers 2020-12-19 00:46:48 -05:00
Randall Leeds
2ad21734d4 Enable Python 3.8 and Python 3.9 testing in AppVeyor 2020-12-19 00:46:42 -05:00
Randall Leeds
f376da2e66 Test on Python 3.9 2020-12-19 00:40:40 -05:00
Randall Leeds
c097bec0cc
Merge pull request #2476 from benoitc/fix/1909/no-log-config-dict-cli
Remove the --log-config-dict flag
2020-12-18 20:50:12 -05:00
Randall Leeds
37994e1422 Remove the --log-config-dict flag
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.
2020-12-18 20:49:11 -05:00
Randall Leeds
3573fd38d0 Capture peer name from accept
Avoid calls to getpeername by capturing the peer name returned by
accept.
2020-12-17 22:13:02 -05:00
Benoit Chesneau
7ca05ec4e1
Merge pull request #2475 from m2p-consulting/log-killed
Log a warning when a worker was terminated due to a signal
2020-12-17 11:29:04 +01:00
Randall Leeds
b7f2a82731
Merge pull request #2277 from JordanP/graceful-enotconn
Do not raise and crash worker on ENOTCONN error
2020-12-16 19:09:35 -05:00
Armin Berres
b695b497b9 Log a warning when a worker was terminated due to a signal
This happens for example when being OOM killed.

See #2215
2020-12-16 11:05:27 +01:00
Alex Hill
d8a1256065
Document that gthread also uses worker_connections
The `ThreadWorker` uses `worker_connections` it in its run loop to limit how many connections are accepted.
2020-12-10 16:10:50 +08:00
Joshua Kugler
da3b89b765 The signature of __init__ on the "fall through" InotifyReloader
was missing the extra_files paramater, so specifying the inotify
reload engine on the command line when one did not have inotify
installed would, instead of a nice message about needed inotify
installed would result in the following traceback:

```
[2020-10-30 00:55:43 +0000] [7] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/usr/lib/python3/dist-packages/gunicorn/workers/base.py", line 132, in init_process
    self.reloader = reloader_cls(extra_files=self.cfg.reload_extra_files,
TypeError: __init__() got an unexpected keyword argument 'extra_files'
```

I didn't see an easy way to writing a test for this, but would be
happy to take pointers.
2020-10-29 17:26:59 -08:00
Moshe Kaplan
548d5828da
Remove reference to gunicorn/six.py in tox.ini (#2427) 2020-09-23 17:31:23 +03:00
Benoit Chesneau
1ae46ca092
Merge pull request #2418 from duanhongyi/master
fix: repair django wsgi running error
2020-09-18 16:36:20 +02:00
Benoit Chesneau
5175471f42 be more explicit in the description of USR2 flow. 2020-09-17 17:10:07 +02:00
Randall Leeds
1d6f902987 Disable pylint raise-missing-from
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.
2020-09-13 15:37:11 -07:00
Chris Mildebrandt
ca36d410fd Fix format call 2020-09-11 23:05:38 -07:00
Chris Mildebrandt
28df9926d7 Add additional logs when worker exits abnormally 2020-09-11 22:41:27 -07:00
duanhongyi
83319f752c fix: repair django wsgi running error 2020-09-10 16:13:06 +08:00
Benoit Chesneau
b3f9815aba fix: don't enforce the content length
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
2020-08-26 10:56:04 +02:00
Ken Okada
f2d8b6d100 Split long line 2020-08-24 21:15:31 +09:00
Gastón Avila
b80a329354
Correction on default value for config file (#2408)
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.
2020-08-22 20:13:02 +03:00
Ken Okada
d81c6cefcb Warn in the case of bad systemd configuration 2020-08-20 09:00:03 +09:00
larribas
2a16fcd3ce Test and defend against the specific case where the statsd hostname is 'unix' 2020-07-20 10:16:42 +02:00
larribas
15abac7e81 Allow specifying a UDS socket address through --statsd-host 2020-07-19 20:11:09 +02:00
Randall Leeds
5001de6070
Merge pull request #2354 from ssanjaysubramaniam/patch-1
Typo/grammar in Deploying Gunicorn docs
2020-07-07 19:35:01 -07:00
Christian Clauss
7e16d13011
Port websocket examples to Python 3 (#2371) 2020-07-02 23:34:11 +03:00
Hugo
e60a5591b0 Add project_urls and update to https 2020-06-21 01:23:45 +03:00
Sanjay
4b9afb47bd
Probably a typo 2020-06-08 11:38:20 +05:30
Randall Leeds
4bed9e7b19
Merge pull request #2344 from tiangolo/dunder-main
 Add support for python -m gunicorn
2020-05-29 11:17:15 -07:00
Sebastián Ramírez
17e70dac53 Add support for python -m gunicorn 2020-05-29 18:44:50 +02:00
Lee Burnette
0d28529cb0 Fixed two bugs related to gevent + gunicorn + statsd. 2020-05-20 12:16:08 -04:00
Dustin Ingram
6aab4decde Add additional missing docs 2020-05-15 03:30:08 +03:00
Dustin Ingram
d43399796a Update desc for Timeout 2020-05-15 03:30:08 +03:00
Randall Leeds
611a314cff
Merge pull request #2326 from ekohl/patch-1
Correct systemd socket activation example
2020-05-08 09:19:41 -07:00
Ewoud Kohl van Wijngaarden
4ababc368b
Correct systemd socket activation example 2020-05-05 12:49:22 +02:00
Randall Leeds
bac7f0300b
Merge pull request #1450 from hramezani/issue_1359
Specify wsgi_app in config
2020-05-03 16:03:07 -07:00
Hasan Ramezni
57a9e2eb7e Specify wsgi_app in config #1359. 2020-05-01 01:11:21 +02:00
Randall Leeds
b2dc036463
Merge pull request #2292 from di/document-infinite-timouts
Document --timeout 0
2020-04-22 11:09:20 -07:00
Randall Leeds
79fc9a3b00 Log abnormal arbiter shutdown at error level 2020-04-20 19:32:12 -07:00
Randall Leeds
ee1e5c1928 Log abnormal worker exit codes 2020-04-20 19:31:53 -07:00
Randall Leeds
a232c270fd
Merge pull request #2313 from benoitc/keepalive-graceful-shutdown
Disable keepalive during graceful shutdown
2020-04-20 18:49:08 -07:00