3187 Commits

Author SHA1 Message Date
usr3
99447b0827
Fix typo in deploy.rst 2022-03-13 14:41:33 +05:30
Brett Randall
1aae54a8e1
Merge pull request #2740 from benoitc/gh-actions
Split gh-actions into main/test + lint workflows, replace Travis badges
2022-02-21 10:13:33 +11:00
Tero Saarni
362a52bd84 Added parameter to ssl_context hook for constructing default context
Signed-off-by: Tero Saarni <tero.saarni@est.tech>
2022-02-11 19:26:56 +02:00
Brett Randall
71d6388f01
Replaced Travis CI badge with 2x gh actions badges for test and lint 2022-02-07 13:40:12 +11:00
Brett Randall
19fb762bd5
Split main tox test build and linters into two workflows. 2022-02-07 13:24:50 +11:00
Brett Randall
80a62afc1e
Updated THANKS. 2022-02-07 08:43:10 +11:00
Christian Clauss
eaebf6d72b Revert the xfail for Python 3.10 2022-02-07 08:23:03 +11:00
Christian Clauss
1feb7c59a2 Revert the xfail for Python 3.10 2022-02-07 08:23:03 +11:00
Christian Clauss
f587bfaf0f GitHub Action to run tox 2022-02-07 08:23:03 +11:00
Christian Clauss
a16b8975a9 GitHub Action to run tox
Because Travis CI seems to be on vacation... https://travis-ci.org/github/benoitc/gunicorn
2022-02-07 08:23:03 +11:00
Brett Randall
238de4e3cf
Merge pull request #2731 from benoitc/daemonize-dev-null-stdin-inheritable
Ensure fd 0 stdin </dev/null is always inheritable

Fixed #2727 .
2022-02-07 07:42:48 +11:00
Brett Randall
230cd03403
Updated THANKS. 2022-02-07 07:39:46 +11:00
Brett Randall
0b6939de86
Undo changes that make -R branch logic behave the same as non -R branch,
that is, to close(0) and open /dev/null as fd=0 instead of fd=3.

(Partially) Revert "Ensure fd 0 stdin </dev/null is always inheritable."

This partially reverts commit 7946678f271e25473618929d6f2725c8c375563e.
2022-02-07 07:39:46 +11:00
Brett Randall
e9c4f7443e
Revert "Refactoring: common stdin </dev/null."
This reverts commit a4f286769858ecfef14080f815adce26c260b2a9.
2022-02-07 07:39:46 +11:00
Brett Randall
eedc3a38b6
Refactoring: common stdin </dev/null. 2022-02-07 07:39:46 +11:00
Brett Randall
835a4fc420
Ensure fd 0 stdin </dev/null is always inheritable.
When gunicorn --daemon daemonizes the process, prior to this change it was
noted that in the general case (without -R / --enable-stdio-inheritance), when fd 0
was replaced with /dev/null, the dup2 copy is skipped, and per PEP 446
"Make newly created file descriptors non-inheritable", the result was a stdio
fd </dev/null which was non-inheritable.  As a result, any launched subprocess
did not have an open 0/stdin fd, which can cause problems in some applications.

This change retains the behaviour of opening /dev/null with fd 0, but adds a call
to os.set_inheritable(..) to ensure the fd is inheritable.

The -R branch had different logic but has now been standardised with the general
case.  It was previously opening /dev/null as fd 3 and the dup2() copy made it
inheritable as fd 0.  This branch now applies the same logic: open as fd 0
(i.e. after close(0)), then set_inheritable.  As a result, an extra fd 3 </dev/null
previously left open is no longer left open.

Signed-off-by: Brett Randall <javabrett@gmail.com>
2022-02-07 07:39:46 +11:00
Krystian
e5a97150c9
fix chdir documentation typo (#2656) 2022-02-04 08:11:51 +11:00
Brett Randall
60d0474a6f
Merge pull request #2720 from kianmeng/fix-typos
Fix typos
2022-01-18 08:44:23 +11:00
Kian-Meng Ang
cf3619f831 Fix typos 2022-01-14 23:34:02 +08:00
benoitc
76f8da24cb Revert "Log a warning when a worker was terminated due to a signal"
This reverts commit b695b497b9b8e7351808848ab9e342219601742a.
2021-12-17 15:16:34 +01:00
Dariusz Działak
c30b0d9d59 Fix problem that may happen after interrupted chunk-encoding request
more in bug report: https://github.com/benoitc/gunicorn/issues/2684

Fixes #2684
2021-11-15 11:27:15 +01:00
Vytautas Liuolia
f639128bd7 Fix sendfile behaviour for open files with non-zero offset. 2021-11-12 21:39:10 +01:00
James McKinney
141a8f3d77
docs: gthread is a sync worker 2021-11-12 13:03:20 -05:00
Paul Miller
e3b0b1f91a
integral? that took me a while to figure out
integral: "In mathematics, an integral assigns numbers to functions in a way that describes displacement, area, volume, and other concepts that arise by combining infinitesimal data."

integer: an int type
2021-10-08 21:04:12 -04:00
Karthikeyan Singaravelan
3a6649a9ef
Fix link 2021-09-27 16:09:50 +05:30
Tero Saarni
5a581c0b14 Update SSLContext handling
* Change deprecated ssl.wrap_socket() to SSLContext.wrap_context().
* Add new server hook to allow user to create custom SSLContext.
* Updated the documentation.

Signed-off-by: Tero Saarni <tero.saarni@est.tech>
2021-09-12 17:39:06 +03:00
Benoit Chesneau
ff58e0c6da
Merge pull request #2631 from hugovk/update-deprecated-unittest-aliases
Replace deprecated unittest alias
2021-09-06 21:28:27 +02:00
duanhongyi
df82cac7d9 fix: gunicorn run tornado app failed 2021-09-01 18:06:28 +08:00
yingjie
0215f5dc36 docs: add examples for cert-reqs 2021-08-26 22:41:12 +08:00
Hugo van Kemenade
45687c358c Replace deprecated unittest alias 2021-08-18 13:09:03 +03:00
Andrey
daacf39c3f
Improve access-log-format documentation section
Added more clearly info about user name identifier (u). That will save a bit of time for developers due log configuration, like this guy https://stackoverflow.com/questions/51660511/gunicorn-access-logs-shows-empty-user
2021-08-06 10:17:15 +03:00
Benoit Chesneau
1299ea9e96
Merge pull request #2581 from temoto/patch-1
eventlet worker: ALREADY_HANDLED -> WSGI_LOCAL
2021-07-02 21:50:26 +02:00
laggardkernel
7d50d61f94 Fix calling condition for Arbiter.log.reopen_files()
`GUNICORN_FD` is not always set in a `reexec`ed child process.
Considering `Arbiter.master_pid` is set after log reopening,
choose `GUNICORN_PID`.
2021-06-22 12:21:13 +08:00
Jack Zhang
90ef9a6a94 Add nginx documentation for proxy_ignore_client_abort 2021-06-10 10:40:13 +08:00
Sergey Shepelev
6a8ebb4844 eventlet worker: ALREADY_HANDLED -> WSGI_LOCAL
Eventlet v0.30.3+ removed wsgi.ALREADY_HANDLED in favor of
`wsgi.WSGI_LOCAL.already_handled: bool`

Sorry, this breaking change happened during only patch
version increase 0.30.2 -> 0.30.3

https://github.com/eventlet/eventlet/issues/543
https://github.com/eventlet/eventlet/pull/544
2021-06-09 21:49:48 +03:00
Karthikeyan Singaravelan
927c604fb7 Set daemon attribute instead of using setDaemon method that was deprecated in Python 3.10 2021-04-26 12:34:01 +00:00
Benoit Chesneau
cf55d2cec2 bump version 2021-03-27 03:07:48 +01:00
Jack Zhang
917ebcdd57 Fixes #1695 2021-03-25 22:31:58 +08:00
Michael Milton
b83448bfb4
Clarify the secure scheme behaviour, with examples (#2492) 2021-03-08 10:58:22 -08:00
Benoit Chesneau
2ffc1b7512
Merge pull request #2526 from smilerlee/master
Fix a naming error for gthread worker
2021-02-24 11:57:57 +01:00
Smiler Lee
fb05e33377 Fix a naming error for gthread worker 2021-02-24 17:43:17 +08:00
Daan Luttik
3b8ce3df1f
Added a line to the documentation to further explain the use of logconfig_dict
Added a line to make the question "how to use `logconfig_dict`" way easier to answer.
2021-02-16 15:54:49 -08:00
Randall Leeds
01f5d4dd0c Remove 2020 unreleased changelog 2021-02-15 20:00:25 -08:00
Randall Leeds
1cfb59caaa Fix changelog lint 2021-02-15 20:00:13 -08:00
Randall Leeds
6fbe6a115b Clarify grammar in FAQ about worker restarts
Noticed by @guettli on GitHub, this sentence was likely supposed to say
that workers may "be killed" and "start up", where "to start up" is a
verb phrase while "startup" is a single word noun. Clarify by changing
this to read "to stop and start".
2021-02-15 18:23:59 -08:00
Benoit Chesneau
426fe70a54
link to 2021 2021-02-12 22:57:48 +01:00
Benoit Chesneau
61ccfd6c38 bump to 20.1.0 2021-02-12 22:43:44 +01:00
sergeypeloton
540b7100b3
Use warning level for 'Bad request' logs
#2491 
Debug level might not be practical to enable in production.
2021-01-08 14:36:14 -05:00
Benoit Chesneau
d1f0f11b7b fix inline code syntax in news 2021-01-08 13:55:28 +01:00
Benoit Chesneau
f87882e4ab add an empty line in news.rst 2021-01-08 12:30:31 +01:00