The values of both the 'workers' and 'umask' settings have global
defaults. In the case of 'workers', this global default can be
overridden by the WEB_CONCURRENCY environment variable, which prior to
this commit is ignored by `gunicorn --paste`.
Removing this duplication of defaults allows `gunicorn --paste` to
respect settings from:
- the environment (WEB_CONCURRENCY)
- the paste configuration file
- CLI flags
Rather than using fileConfig twice and risking different defaults
and behavior around disable_existing_loggers (ref #902), simply
set the default logging config file to be the paster config file
if it has a logger section and let glogging set up the rest.
This reverts commit b5aab16bf590cacff1825410d9cfaea925de5b24.
Change was broken. If we simply switch there, the error when loading the
config will not be reported correctly. We should find a better way.
PR that rebase #651. Should also fix#625.
Add the capability to load gunicorn.base.Application without the
loading of the arguments of the command line.
This change favors `python2` over `python3` by reversing the try/except order.
Untested in `python3`, as most Django packages are not yet `python3`-compatible.
Works in `python2`, `Django 1.5.4`, `gunicorn 18.0`.
When running `gunicorn` in python 2, if a django model doesn't validate, the `gunicorn` will fail to display informative error messages about your model and instead complain about `str`/`unicode`:
Django was falsely accused of [this bug](https://code.djangoproject.com/ticket/20185)
Using gunicorn with paster command line causes the application to
load before gunicorn. In this case, there is no choice but to preload
the application. Document this fact.
Fixes#528.
It is now possible to specify a file with "config" as an application
configuration key in a paste deploy configuration file. This allows
paster applications to use the full range of gunicorn settings even
when using paste/pserve rather than gunicorn_paster.
Fixes#540.
Enable inheritance for stdio file descriptors in daemon mode. It allows
you in daemon mode to redirect the output to a file if needed.
By default in daemon mode gunicorn will close all file handle except if
you pass the "-R" options. In this cases STDIO will be preserved.
fix#309
The Arbiter is smart about getting the CWD; first it checks the CWD
environment (which doesn't resolve symlinks), then it falls back to the
python os.getcwd() (which does resolve symlinks). However, the Arbiter
is the only place that does this, which will then do the right thing
when we reexec. However, when reloading the Arbiter, it won't pick up
changes if the symlink has changed.
By changing the *app.py entry points to also use the same method for
determining the CWD, we'll insert a symlink path into the first location
in sys.path. Then our reloaded app will correctly pull in any new
changes.
Add options to setup logging to syslog:
- `--log-syslog`: enable syslog. It default to `/var/run/syslog` on darwin,
`/var/run/log` on freebsd, `/dev/log` on openbsd and udp://localhost:514 for
other platforms.
- `--log-syslog-prefix: Pass the parameter to use as the program name
- `--log-syslog-to`: Setup the syslog address to send message. Address startinf
by udp:// will send to udp, unix:// to a unix socket and tcp:// to tcp (useful
for rsyslog)
fix#452 .
Allows gunicorn to listen on different interface. It can be either ipv6,
unix or ipv4 sockets.
Ex:
gunicorn -w3 -b 127.0.0.1:8001 -b 127.0.0.1:8000 -b [::1]:8000 test:app
fix#444