2629 Commits

Author SHA1 Message Date
Daniel Pope
2ea5fbdc86 Use Python's default SSL cipher list by default (#1970) 2019-01-24 22:41:04 +01:00
Takuya N
7af6f651c0 Add restructuredtext_lint to test (#1598)
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2019-01-22 11:56:49 +01:00
Randall Leeds
e0f177ca45 Fix code block formatting in docs 2019-01-22 00:59:41 -08:00
fangfei
6da84c614d Fix root logging
root and logger are same level. https://docs.python.org/2/library/logging.config.html#dictionary-schema-details
2019-01-21 22:51:55 -08:00
Brett Randall
c85bfba8b2 Fixed typo in ssl_version doc, TLSv2 -> TLSv1_2 (TLS 1.2). (#1959)
* Fixed typo in ssl_version doc, TLSv2 -> TLSv1_2 (TLS 1.2).

Signed-off-by: Brett Randall <javabrett@gmail.com>

* revert chdir change
2019-01-22 00:03:38 +01:00
Дамјан Георгиевски
ba0d784960 documentation: update systemd deploy unit examples (#1950)
There's no need for PIDFile=, especially not for Type=notify services.
systemd knows the correct pid of the process it manages.

No need for the `--bind` option either, since gunicorn supports the
LISTEN_FDS environment variable and will use all of the sockets that systemd
provides. This way, it's also more flexible, since we can specify several
sockets in a .socket unit.

The .socket unit should specify User=www-data so that nginx can connect to the socket.
The service (gunicorn process) will inherit the file descriptor so it
doesn't even need permissions for the socket (it's nginx which needs
permissions).

tmpfiles.d is not needed.

replace ExecStop=/bin/kill with KillMode=mixed
2019-01-11 13:52:06 +01:00
Дамјан Георгиевски
9184ae8898 add systemd sd_notify support (#1897)
* add systemd sd_notify support

roughly based on sd_notify() from systemd and https://github.com/bb4242/sdnotify

only implements `READY=1` and `STATUS=Gunicorn arbiter booted` of the
protocol in the arbiter. in the future, reloads can be notified, and
possibly also other statuses.

see https://www.freedesktop.org/software/systemd/man/sd_notify.html for
more info

sd_notify() is a noop when not run in a systemd service (i.e
NOTIFY_SOCKET environment variable is not set)
2019-01-11 04:41:09 +01:00
Pengpeng Zuo
ad1afe7b79 Fix typo in gthread.py 2018-12-23 12:11:36 +03:00
Niklas B
33025cf610 tornado 5 support (#1918)
tornado 5 support by keeping track of the periodic callbacks
2018-12-09 10:23:56 +01:00
John Sirois
ba9a4462c6 Declare our setuptools dependency (#1931)
We rely on setuptools' pkg_resources in a few places so we declare our
dependency so that packaging and installation tools work.

Fixes #1716
2018-12-07 12:43:27 +03:00
Florian Apolloner
ee7af1247b Added support to --bind to open file descriptors (#1809)
Fixes #1107
2018-11-16 20:21:13 +03:00
Jake
efdb5acdd0 Docs: Serving WSGI app modules from Gunicorn (#1817) 2018-11-16 20:11:22 +03:00
Ron DuPlain
6d76ed8e6c Provide guidance on X-Forwarded-For access log. (#1906)
The doc change introduced in #1037 is initially helpful but then internally
inconsistent. It correctly points out that X-Forwarded-For is no longer
used in setting REMOTE_ADDR (c4873681299212d6082cd9902740eef18c2f14f1),
but then confusingly indicates a solution using the X-Forwarded-For header.

The deployment doc provides a full configuration example which includes
proxy headers as set by nginx. What is missing, before this patch, is a
clear suggestion on how to make use of the header in Gunicorn's access
log.

Accordingly, remove the confusing suggestion and replace it with a drop-in
replacement for Gunicorn's default access log format.
2018-11-16 19:52:37 +03:00
Berker Peksag
c66957bbe9 Add support for named constants in the --ssl-version flag
Fixes #1114

Co-Authored-By: Brett Randall <javabrett@gmail.com>
Signed-off-by: Brett Randall <javabrett@gmail.com>
2018-10-31 14:43:40 +03:00
Brett Randall
3627c1cff5 AppVeyor: allow failures, run lint using Python 3.7 (#1911)
Signed-off-by: Brett Randall <javabrett@gmail.com>
2018-10-31 14:40:08 +03:00
Ron DuPlain
e5c11e8f8a Clarify log format usage of header & environment (#1907) 2018-10-28 23:38:51 +03:00
Brett Randall
9c9f1f2bb9 Update Python versions in Travis CI and tox (#1902)
- run lint using latest Python 3.7
- updated env list in tox.ini
  - added py38-dev
  - removed py36-dev
- moved aiohttp to requirements_test.txt

Signed-off-by: Brett Randall <javabrett@gmail.com>
2018-10-28 10:29:17 +03:00
Arianit Uka
bb0b366b26 Fixed systemd documentation to properly setup gunicorn unix socket
The systemd files recommended in the docs do not work. The socket file disappears after the first request, or after the service is restarted. 

This commit updates the systemd files to include the correct settings
2018-10-12 13:07:38 -07:00
Dustin Ingram
80dfe06943 Update CI configs for 3.5, 3.6, 3.7 and 3.8 (#1888)
* Update .travis.yml

Make 3.7 required to pass, and test against 3.8-dev

* Update appveyor.yml as well
2018-10-09 06:07:56 +02:00
Konstantin vz'One Enchant
927fb2ba02 Prevent removal unix socket for reuse_port (#1887)
If you have two (or more) instances of gunicorn that use `reuse-port`
and bind to single unix socket all work until one of gunicorn will
stopped. Because the first stopped removes unix socket file and other
instances can't longer process requests.
2018-10-02 13:25:35 +02:00
Ryan Lopopolo
eae3ef05f3 Fix ResourceWarning when reading a Python config module (#1889)
The raw open call in execfile_() did not close the file handle.
2018-10-02 09:53:26 +03:00
Konstantin Enchant
df8290d153
Revert "Prevent removal unix socket for reuse_port"
This reverts commit af7f158d224c9925e3315ee216c07adc09c64b61.
2018-10-01 14:29:25 +03:00
Konstantin vz'One Enchant
af7f158d22
Prevent removal unix socket for reuse_port
If you have two (or more) instances of gunicorn that use `reuse-port` and bind to single unix socket all work until one of gunicorn will stopped. Because the first stopped removes unix socket file and other instances can't longer process requests.
2018-10-01 12:52:03 +03:00
刘金俭
59bf81cb58 Remove unnecessary call to dict keys method 2018-09-24 10:31:28 -07:00
Randall Leeds
e179dc2575 Support str and bytes for UNIX socket addresses (#1882)
Some systems report UNIX socket addresses as bytes while others will
report it as a unicode string type. This patch improves socket type
detection code to support both.

Fix #1861
2018-09-24 08:57:53 +02:00
Pritam Baral
30554fdb4f InotifyReloader: Handle module.__file__ is None
0f527a01f4 added a fix for the case when some modules have the `__file__` attr set to `None`, for the polling reloader. Unfortunately, it missed making the same fix for the inotify reloader.

This change copies that fix into InotifyReloader
2018-09-17 11:24:17 -07:00
Ciaran Courtney
0ce857fced [closes #1863] Docs: Add /dev/shm as a convenient alternative to making your own tmpfs mount in fchmod FAQ (#1873) 2018-09-06 00:50:35 +02:00
Hugo
a8b5718146 Update THANKS
For https://github.com/benoitc/gunicorn/pull/1764.
2018-09-04 13:45:27 +03:00
Benoit Chesneau
91974f0f44 Merge branch 'pr-1724' 2018-09-04 12:19:30 +02:00
Benoit Chesneau
c16abf922e fix example to work on python3
* fix longpoll example

* fix websocket example

* fix django example

* fix flask exampl
2018-09-04 12:18:05 +02:00
Benoit Chesneau
33162d190f fix broken redirection 2018-09-03 09:14:56 +02:00
Benoit Chesneau
8bc11ff632
use https for docs 2018-09-02 18:10:05 +02:00
Q_back
ab7541f767 Fixed jQuery not using https
Page stopped working on new browsers 
https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content

Blocked loading mixed active content “http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js”[Learn More]
gunicorn.org
Loading failed for the <script> with source “http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js”. gunicorn.org:182
[Show/hide message details.] ReferenceError: $ is not defined[Learn More]
2018-08-31 12:01:59 -07:00
Michael Bishop
ec3c1dbd94 Fix typo in --max-requests documentation (#1845) 2018-08-01 21:47:57 +03:00
Hugo
e974f30517 Drop support for Python 2
Co-Authored-By: Dustin Ingram <di@users.noreply.github.com>
Co-Authored-By: Berker Peksag <berker.peksag@gmail.com>
2018-08-01 15:31:17 +03:00
Michael Bishop
2ff595a02b "work" -> "worker" 2018-07-31 13:55:57 -07:00
Hugo
78208c8c32 Drop support for EOL Python 3.2 and 3.3 (#1839) 2018-07-29 14:07:36 +03:00
7
cdd147841a Clear tornado ioloop before os.fork (#1831) 2018-07-21 13:38:04 -07:00
7
7d0787cd1a Fix linting for Pylint 2.0 (#1833)
Closes #1832
2018-07-18 19:33:09 +03:00
Randall Leeds
29f0394cdd Release version 19.9.0 2018-07-03 13:09:09 -07:00
Randall Leeds
3e265d4319 Regenerate settings documentation 2018-07-03 13:02:41 -07:00
Randall Leeds
c7c0f9db76 Update changelog 2018-07-03 13:00:31 -07:00
Randall Leeds
bd833e0009
Merge pull request #1796 from diegoholiveira/1795-rename-async-module
1795 rename async module
2018-06-17 13:22:31 -07:00
Randall Leeds
f0c54993ca Merge branch 'W7PEA-patch-2' 2018-06-17 13:20:00 -07:00
Randall Leeds
7891310d80 Use consistent style in nginx.conf 2018-06-17 13:19:42 -07:00
Randall Leeds
101f2da922 Merge branch 'patch-2' of https://github.com/W7PEA/gunicorn into W7PEA-patch-2 2018-06-17 13:18:31 -07:00
Justin Turner Arthur
d21310351f Optimize by precompiling regex and using tuple for iterable copies. 2018-06-17 09:51:48 +03:00
Diego Oliveira
557b91964c Merge branch 'master' into 1795-rename-async-module 2018-06-12 18:16:31 -03:00
Berker Peksag
21f0adc346
Fix AttributeError when --reload was not passed (#1806)
Fixes #1805
2018-06-11 22:04:08 +03:00
7
a64d712f7a Remove duplicated sections under Settings (#1804)
Fixes #1798
2018-06-10 02:46:41 +03:00