291 Commits

Author SHA1 Message Date
Berker Peksag
9320811f32 Fix markup in --log-syslog docs 2018-05-06 18:09:33 +03:00
Berker Peksag
eab1256052 Add test and update documentation 2018-05-06 18:05:54 +03:00
Hasan Ramezani
b4b9b18f1a Improve capture_output setting documentation 2018-04-28 22:34:15 +04:30
Bruno Alla
d1f5268b15 Add extras_require for various worker types (#1718)
Fixes #1717
2018-03-08 17:19:44 +03:00
Martin Broadhurst
6171ac4885 Add --reuse-port to make use of SO_REUSEPORT optional (#1669)
Fixes #1603
2018-01-02 20:25:26 +03:00
Berker Peksag
2dd7321c90
Deprecate gaiohttp worker and document alternatives (#1569)
Fixes #1338
2017-10-31 07:30:41 +03:00
Randall Leeds
a7d4491a71 Fix up documentation for dictConfig 2017-10-29 21:43:41 -07:00
Randall Leeds
c5ae962dfa Add CLI option for dictionary log config 2017-10-29 21:43:26 -07:00
Mat Moore
9d7c857521 The logconfig_dict setting is not available on 2.6 2017-10-29 21:28:53 -07:00
Mat Moore
e6de1a07b4 Issue 1087: support dictConfig logging configuration 2017-10-29 21:28:53 -07:00
Hasan Ramezani
90b7daebb6 Fix invalid auto_int value error when --umask=0 passed (#1632)
Fixes #1622
2017-10-28 10:48:23 +03:00
Berker Peksag
1edf8fcff5 Revert "Simplify hook handler config code"
This reverts commit cbbafdb9b1f8b0f04c7a0d174b5d56962e6bdbfe.
2017-09-19 02:28:00 +03:00
Oliver Bristow
cbbafdb9b1 Simplify hook handler config code 2017-09-15 17:56:54 +01:00
Oliver Bristow
f14d4428bd Remove redundant properties 2017-09-14 22:12:06 +01:00
Oliver Bristow
bff593d9e4 replace shim wrap_method with staticmethod 2017-09-14 21:19:36 +01:00
Benoit Chesneau
60efb1041e Merge pull request #1528 from hramezani/redirect_accesslog_issue_1403
Redirect accesslog issue 1403
2017-08-22 21:17:59 +02:00
Hasan Ramezani
7dc9003dff Add disable-redirect-access-to-syslog config 2017-08-22 22:43:30 +04:30
Tuukka Mustonen
0e4e0779e6 doc: Notes about worker keepalive support 2017-08-09 18:05:08 +03:00
Benno Rice
72dd0199d7 Deal fully with deprecated functions.
If possible use a function based on inspect.signature to calculate the
arity.  If inspect.signature is not available fall back to getargspec. The
version based on inspect.signature looks like more code but is actually a
subset of what inspect.getfullargspec does.

html.escape is preferred over cgi.escape primarily because it defaults quote
to True. For this reason pass quote=True to cgi.escape when used.
2017-07-12 16:14:09 +03:00
Nejc Saje
c58560b895 Document selection of 'gthread' worker if sync && threads > 1
The current documentation makes a reader believe that the setting is ignored if the worker type is not Gthread. That is not the case since if the worker is `sync`, a `threads` setting of > 1 sets the worker type to `gthread`.

I know this was probably done to support running gunicorn as `gunicorn --threads=4` and actually have threads even though the default worker is `sync`, but it can be confusing if running `gunicorn --worker-class sync --threads 4` and expecting the parameter will be ignored.
2017-07-07 16:01:16 +03:00
Berker Peksag
ca053a5fe1 Add versionadded directive to reload_extra_files 2017-06-16 14:02:55 +03:00
Rok Garbas
f736909c5d
--reload-extra-file option 2017-06-15 00:46:47 +02:00
Randall Leeds
2de1ea3561 Merge pull request #1465 from hramezani/issue_1325
fix non-decimal values problem in `umask` config.(issue 1325)
2017-03-13 23:44:15 -07:00
Ed Morley
fbd151e984 Remove dead code found using vulture (#1469)
https://pypi.python.org/pypi/vulture

In particular the removal of `get_maxfd()` means the `resource` module
is no longer required (which is not available on Windows) and so helps
with #524.
2017-03-13 13:33:11 -07:00
Hasan Ramezni
ef79ee3983 fix non-decimal values problem in umask config.(issue 1325) 2017-02-19 13:33:42 +03:30
Mark Adams
bc20bea7d9 Add support for --reload-engine
Currently, gunicorn automatically uses the preferred reloader (inotify
if present with fallback to polling). However, it would be useful in
some scenarios if users could force polling.

The solution for this is to add a new configuration option called
'reload_engine' which takes one of three options: ['auto', 'poll',
'inotify'].

Fixes #1459
2017-02-14 19:49:37 +03:00
Berker Peksag
9c73259f71 Make ssl.PROTOCOL_SSLv23 default for --ssl-version
Fixes #1249
2017-02-06 09:10:35 +03:00
Berker Peksag
577c3eb030 Use the best available reloader when --reload is passed
Fixes #1422
2017-02-06 07:32:14 +03:00
Benoit Chesneau
91807e8b90 Merge pull request #1446 from RyPeck/1045/minor-tweaks-to-docs-for-threads-setting
Doc tweaks around threads setting
2017-02-06 04:48:49 +01:00
Berker Peksag
3da2f88dfe Delete deprecated gunicorn_django command and --settings option 2017-02-05 05:57:41 +03:00
Berker Peksag
cb512715fe Fix markup 2017-02-05 01:30:17 +03:00
Berker Peksag
bbaf078309 Add versionadded marker to child_exit documentation 2017-02-05 01:29:06 +03:00
Berker Peksag
9fad8ab6f5 Remove outdated documentation about using entry points
Closes #1365
2017-02-05 01:24:49 +03:00
Benoit Chesneau
21ffa92be1 Merge pull request #1394 from jonashaag/master
Add child_exit() callback to configuration
2017-01-27 16:00:58 +01:00
Ryan Peck
55e15323ac Doc tweaks around threads setting
In response to #1045 minor tweaks to the documentation to emphasize that
the `--threads` setting is only applied to the `gthread` worker.
2017-01-25 23:14:22 -05:00
Berker Peksag
9e311e1838 Fix versionadded value and tweak --paste-global docs 2017-01-13 12:22:47 +03:00
Hasan Ramezani
3f9eace246 Add ability to pass settings to GUNICORN_CMD_ARGS. (#1385) 2017-01-08 16:41:28 +03:00
vishesh92
c54426c1e4 Minor fixes in docs and doc's code style (#1361) 2016-12-28 19:02:32 +03:00
Randall Leeds
8dbb2963b2 allow --reload without any value (#1416)
The documentation suggests that the value is optional, but without
this change it is not.
2016-12-26 18:12:17 -08:00
Berker Peksag
8fe132b39c Tweak WorkerTmpDir docs 2016-12-22 22:00:27 +03:00
Philipp Saveliev
cc4620fb5b docs: a warning for disk-backed --worker-tmp-dir #1305 (#1329)
* docs: a warning for disk-backed --worker-tmp-dir #1305

* docs: move os.fchmod issue solution to FAQ

* docs: improve worker_tmp_dir setting docs
2016-12-20 15:20:55 -08:00
Jonas Haag
53fd1c1071 Add child_exit() callback
This is similar to worker_exit() in that it is called just after a
worker has terminated, but it's called in the Gunicorn *master* process,
not the *child* process.
2016-11-25 12:16:23 +01:00
Mark Adams
6eb01409da Fix validate_reload by returning the validated value (#1378)
* Fix validate_reload by returning the validated value

When '--reload=RELOADER_TYPE' was implemented, `validate_reload()` was
added but in one of the last refactorings, it lost the return statement
at the end of the function. As a result, the '--reload' config value was
totally broken.

This resolves the issue by adding the missing return.

* Fix tests by changing --reload to always require an argument

- '--reload' always requires an argument now
- Added 'auto' as the default value for '--reload'
2016-10-28 08:35:24 +02:00
Mark Adams
b98205f896 Update documentation to indicate inotify requirement for reloader 2016-10-25 08:29:05 -05:00
Mark Adams
92d48256e4 Modify 'reload' config to be more consistent with existing API
--reload = Runs the reloader with inotify if available and falls back on
           FS polling.
--reload=inotify = Forces the reloader to run with inotify
--reload=poll = Forces the reloader to use FS polling
2016-10-24 11:39:10 -05:00
Mark Adams
64b26ef766 Fix #1368 by adding InotifyReloader and 'use-inotify' configuration option
Currently, '--reload' uses FS polling to find out when files have
changed. For some time, the Linux kernel has had a feature called
inotify that allows applications to monitor for FS events without
polling.

This commit adds a new 'use-inotify' configuration option that will
cause gunicorn to use the new 'InotifyReloader' instead of the default
'Reloader' when 'reload' is enabled.

Using inotify can result in lower CPU consumption by gunicorn especially
when working with virtualized filesystems or environments with a large
number of watched files / directories.
2016-10-17 21:21:37 -05:00
Tobias Gustafsson
70cfb0d818 Remove upper limit on max header size config (#1313)
Fixes #1306
2016-09-17 12:49:05 +03:00
Berker Peksag
9021cf80bb Remove trailing comma from ConfigCheck.cli 2016-08-21 13:18:55 +03:00
Berker Peksag
fdd5276a4c Update --access-logfile documentation
This is a follow up of 34af3f8e926adeebd8a73f987ca36d2f696aef05.
2016-07-28 22:04:26 +03:00
Randall Leeds
77eea1445d add versionadded to new paste global option 2016-07-16 12:34:17 -07:00