163 Commits

Author SHA1 Message Date
Berker Peksag
07428ddbfe Merge branch 'delete-old-django-app' 2016-04-15 00:40:39 +03:00
felipe
06c1429af7 Add an example to demonstrate using a Django setting file as Gunicorn config 2016-04-15 00:35:31 +03:00
Berker Peksag
36d2c4d809 Delete old Django 1.1-1.3 example 2016-04-15 00:19:38 +03:00
Arnav Kumar
680f8d7281 Fix URL and default worker type in example_config 2016-02-18 01:03:38 +08:00
benoitc
5f4ebd2eb2 don't return utf8 header in example
Since the updated RFC 7230 implys that new Headers Key and Value should be
sent as USASCII only don't try to test utf8 headers in examples.

We now only encode them to ascii. Gunicorn will fail if it's unable to encode
them letting the responsability to the application to correctly encode the
response. (we are just a gateway).

While i'm here simplify the code to not create an extra function only used at
one place.

NOTE: if anyone come to a better solution, i am happy to revisit it on the
next release.

fix #1151
2015-11-25 13:29:46 +01:00
Berker Peksag
353f610c1e Do not duplicate nginx config files.
Fixes #1050
2015-09-26 11:33:12 +03:00
lovedboy
ac4292f60e add web.py frameworks example 2015-09-22 21:09:19 +08:00
Berker Peksag
b5d188422e Tweak some examples.
* Return bytes in Python 3
* Activate wsgiref.validate.validator
* Remove unused imports
2015-07-08 13:53:19 +03:00
Carl Meyer
2169b044d6 Update example nginx configs to require Host match. 2015-06-15 16:59:34 -06:00
siznax
b054b7e91c fixed syntax error in examples/gunicorn_rc. 2015-02-26 15:56:32 -08:00
Menghan
51bd1b12a1 remove option --debug and update documents 2014-10-17 11:40:03 +08:00
Collin Anderson
0d3045bb41 cleaned some code 2014-09-10 20:34:22 -04:00
Collin Anderson
03fbe9429d clean whitespace 2014-09-10 09:52:12 -04:00
Collin Anderson
fcde3f0e6e example django app: removed warnings on django 1.8
compatible with django 1.4+
2014-09-09 11:29:49 -04:00
Collin Anderson
c9fc89d11e removed supervisor.conf autostart=true
it's true by default.
2014-09-05 17:38:25 -07:00
Edvinas Jurevicius
69c16db93c Fix supervisor.conf example 2014-09-05 22:20:26 +01:00
benoitc
f9d4144add fix tornado example.
bad command line in example. fix #861
2014-08-21 14:43:56 +02:00
Daniel Quinn
f495a865c5 Typo
s/suite/suit/
2014-07-26 22:43:04 +02:00
benoitc
05409f92af example: edit paste example to allow the display of gunicorn logs 2014-07-26 11:24:29 +02:00
benoitc
43b8687ceb fix django ex 2014-07-26 10:24:26 +02:00
benoitc
aacfba1aed fetch all input body in gaiohttp to work w/ non asyncio wsgi apps
I took the suggestion of @asvetlov. This change load first all the body
in RAM in the gaiohttp worker to handle classic WSGI application. This
is a temporary fix, it should be replaced asap by a streaming behaviour.
It does the trick anyway for most application since you're not supposed
to handle large body directly with gunicorn.

fix #803
2014-06-28 16:38:01 +02:00
Stéphane Wirtel
944e224d36 Fix typo in the examples 2014-06-16 17:51:34 +02:00
Benoit Chesneau
94f2cc03e1 Merge pull request #786 from zeezooz/fix_signals
Change the rest of QUIT and TERM signals.
2014-06-13 22:40:03 +02:00
Andrew Burdo
ed2d2a8ab3 Change the rest of QUIT and TERM signals.
This will restore graceful shutdown of workers by master.
Also worker_int callback is moved from handle_exit (INT and TERM before switching) to handle_quit(INT and QUIT).
2014-06-13 14:32:11 +03:00
Berker Peksag
1c68516fd7 Update custom application example.
It's running on both Python 2 and 3 now.
2014-06-13 14:26:57 +03:00
Randall Leeds
ae14150cad Merge pull request #727 from benoitc/feature/threaded-worker
Feature/threaded worker
2014-06-01 14:16:44 -07:00
benoitc
64fd52354c fix comment in timeout example. 2014-06-01 21:59:50 +02:00
benoitc
d9b7e32d34 try to log what happened in the worker after a timeout.
fix #518
2014-06-01 11:22:19 +02:00
Matt Robenolt
0e78e78598 Update nginx config to reflect best practice
Should use `try_files` then fall back to a named location block. This is also what's recommended inside the docs already: http://gunicorn-docs.readthedocs.org/en/latest/deploy.html#nginx-configuration
2014-05-26 20:20:15 -07:00
benoitc
6aa99e4441 fix keepalive 2014-05-13 12:30:57 +02:00
Randall Leeds
fd22ea24ae Merge pull request #727 from benoitc/feature/651
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.
2014-05-07 14:53:29 -07:00
Stéphane Wirtel
a44807f9f5 Add an example of a standalone app 2014-04-22 21:48:57 +02:00
Randall Leeds
dc7dc14229 More logging.conf example typos 2014-02-20 02:00:23 -08:00
Randall Leeds
3d0afc837e fix typo in logging.conf example 2014-02-04 19:55:07 -08:00
Randall Leeds
e106bf82a8 Add --reload option for code reloading
Fix #526
2014-01-15 19:08:34 -08:00
benoitc
03a6136083 add a quick test to make sure we get the sys.stderr 2014-01-01 15:52:44 +01:00
benoitc
ef329a8f73 fix logging.conf exampple 2014-01-01 14:55:13 +01:00
benoitc
a0ccfa0c4f modify log_file option
Gunicorn should generally only bother writing its own log and let
the application handle the way it want to log its own errors.

Now the log_file option will be overriden by the gunicorn options
`--error-logfile` and `--access-logfile` if they are given.
2014-01-01 14:53:40 +01:00
benoitc
95efe1b7d2 add worker_int callback
fix #516
2013-12-26 12:26:07 +01:00
benoitc
69ab24b589 fix examples/nginx.conf 2013-12-11 11:19:35 +01:00
Chris Streeter
7d64a5f44f Fix typo. 2013-11-24 21:52:27 -08:00
benoitc
3452379108 remove useless lines in example 2013-08-27 15:32:01 +02:00
benoitc
4e3428af0e add -e/--env command line argunment
This command line argunment allows someone to pass an environement variable to
gunicorn:

	$ gunicorn --env FOO=1 test:app

With the command line above the application will be able to use the FOO
environment vatriable.
2013-08-27 13:21:53 +02:00
benoitc
dc97e54412 handle io.BytesIO object with file_wrapper
fix #595
2013-08-27 11:45:32 +02:00
Randall Leeds
ec2ee0b127 Support for python config file option in paster
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.
2013-08-05 22:04:43 -07:00
benoitc
5e08c27495 improve STDOUT/STDERR logging redirection.
Instead of faking STDIN/STDERR to a fake object that we close on reopen,
simply redirect them to a file and reopen this one when need.

Should fix most of the issues on #309
2013-04-21 11:31:58 +02:00
benoitc
1198cc2723 handle ssl connections.
gunicorn is now supporting ssl connections:

    $ gunicorn -w3 --certfile=server.crt --keyfile=server.key test:app

works with all supported workers
2012-12-14 10:22:05 +01:00
benoitc
b7b51adf13 allows gunicorn to bind to multiple address
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
2012-12-14 10:18:39 +01:00
benoitc
91e7d138dc fix header encoding 2012-11-16 10:05:26 +01:00
benoitc
e4fbc805b6 fix error spotted by @andrewsg 2012-10-28 06:56:00 +01:00