1366 Commits

Author SHA1 Message Date
Philip Cristiano
161d9ea676 Fix capitalization 2013-06-20 18:15:53 -04:00
Philip Cristiano
0ae7fd760d Add post-init hook for workers
Allows a config specifying a function after a worker has been initialized and before the run loop
2013-06-20 17:39:46 -04:00
benoitc
e77d47cb97 don't raise an error when we close the socket.
fix #537
2013-06-05 10:44:20 +02:00
benoitc
9673b970d0 update THANKS 2013-06-05 10:34:07 +02:00
Benoit Chesneau
438a0e1c66 Merge pull request #532 from kevingessner/master
eventlet: after reaching max_requests, wait up to the graceful_timeout for currently-running requests to complete.  fixes #511
2013-05-31 14:47:06 -07:00
Andreas Stührk
fa7fd6fed0 Use a WSGI "bytes-as-unicode" string for PATH_INFO under Python 3. 2013-05-27 08:33:58 +02:00
Kevin Gessner
567b4f6574 eventlet: after reaching max_requests, wait up to the graceful_timeout for
currently-running requests to complete.  fixes #511

Requests that do not complete within the graceful timeout are killed.
2013-05-16 11:13:12 -04:00
benoitc
ca35dc7335 link to 0.17.4 2013-04-24 23:53:38 +02:00
benoitc
981e4112fe bump to 0.17.4 2013-04-24 23:52:24 +02:00
benoitc
82099deff2 remove stupid change.
fix #519
2013-04-24 23:49:50 +02:00
benoitc
aaea6ea026 bump to 0.17.3 2013-04-24 10:15:04 +02:00
benoitc
3b6b771a71 aggregate Logging options 2013-04-23 17:14:55 +02:00
benoitc
db48dd355d add systemd documentation 2013-04-23 16:51:24 +02:00
benoitc
6d2c5f8b08 0.17.3 doc. 2013-04-23 16:39:02 +02:00
benoitc
160db1f521 nginx way to set unix addresses 2013-04-23 16:29:31 +02:00
benoitc
532d1fffaf document the use of PYTHONUNBUFFERED in config 2013-04-23 16:23:46 +02:00
Graham Dumpleton
32e4cf14df Ensure that detaching from controlling terminals, but allow for redirection to files. 2013-04-23 16:23:46 +02:00
benoitc
29aefcc1cf only close 0-2 fds when -R isn't specified
Following some discussion on IRC with @GrahamDumpleton this patch only
close stdios if -R isn't specified. It also let others fds open and
don't try to close them.

This should fix logging around and behave like other daemons. It should
also close #309.
2013-04-23 16:23:46 +02:00
benoitc
cc7f595adc Enable stdio inheritance.
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
2013-04-23 16:23:46 +02:00
benoitc
208df4ddd9 let the VM close the sockets on exit
Closing sockets when stopping the arbiter was also closing unix sockets
if any because they aren't attached to a specific process. So remove it
and let the vm close them if needed. This change fix the reload of the
binary.

fix #476
2013-04-23 08:38:03 +02:00
benoitc
8eda51267c make sure to not override an existing file 2013-04-23 08:23:06 +02:00
benoitc
2e2432c91b Revert "add GUNICORN_INHERIT_FDS environment variable support"
This reverts commit c9fcb25f51db9ae67f9585c93924e5af8b8bb8b8.
2013-04-22 19:05:31 +02:00
benoitc
612f4125dd make sure we exit immediately if we fail to load the application.
While I'm here describe a more accurate error when it happens.

fix #508
2013-04-22 18:43:20 +02:00
benoitc
3ade8e8d78 make harder for workers to listen at the same time
fix #514
2013-04-22 18:10:18 +02:00
benoitc
4894a1941a make sure we really set the socket to blocking 2013-04-22 18:02:08 +02:00
benoitc
44de346202 add Alexandre Zani to THANKS 2013-04-21 15:05:40 +02:00
Alexandre Zani
12ec996d54 Close connection on error after sending started.
When the application starts yielding a body and then raises an error,
we should immediately close the connection to the client to indicate
the error.
2013-04-21 15:01:18 +02:00
benoitc
230b2ba4ef add Krzysztof Urbaniak to THANKS 2013-04-21 14:56:42 +02:00
Krzysztof Urbaniak
e948195aa9 systemd socket activation 2013-04-21 14:56:06 +02:00
benoitc
ba25de4c1c don't close on exec STDOUT/STDERR 2013-04-21 12:09:46 +02:00
benoitc
c9fcb25f51 add GUNICORN_INHERIT_FDS environment variable support
You can now pass a list of file descriptors to Gunicorn that won't be
closed when it starts. Allows someone to pass any stream to gunicorn or
set some redirection.
2013-04-21 11:57:38 +02: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
9acafc25f0 catch ValueError when ipv6 isn't not supported on the platform
fix #479
2013-04-21 07:47:19 +02:00
benoitc
c31e0f9ac7 Exit when the config file isn't found.
fix #469
2013-04-21 07:40:06 +02:00
benoitc
1e5948e1c8 fix links in the README 2013-04-21 07:10:25 +02:00
benoitc
038ae7a86c add dd `python -m gunicorn.app.wsgiapp`` support
fix #493
2013-04-21 07:03:59 +02:00
benoitc
765839b2ad we only care of it if gunicorn was started as a daemon
fix #466
2013-04-21 07:00:03 +02:00
benoitc
116c82333b update travis.yml 2013-04-18 18:07:46 +02:00
benoitc
b263f21646 bump to 0.17.3 2013-04-18 16:46:41 +02:00
benoitc
1a1c9572ef add fileno method to glogging.LazyWriter
fix #496
2013-04-18 16:20:34 +02:00
benoitc
b8c5c537f8 add jean-philippe serafin to THANKS 2013-04-18 16:08:39 +02:00
jean-philippe serafin
1911facf1a improve logger overide
- add Logger.atoms() that facilitates log format override.
- add Logger.atoms_wrapper_class that permits custom wrapping.

fix #510
2013-04-18 16:06:36 +02:00
jean-philippe serafin
87474ffce1 add test_atom_defaults() 2013-04-18 15:58:55 +02:00
jean-philippe serafin
e755dde2c0 fix vim swap files ignoring 2013-04-18 15:58:55 +02:00
benoitc
fcc1f5a698 fix doc link
related to issue #484
2013-04-18 15:07:05 +02:00
benoitc
2a39f0a35e add Chris Streeter to THANKS 2013-04-03 11:16:17 +02:00
Chris Streeter
e908ec3359 Consistently get CWD across apps and arbiter.
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.
2013-04-03 11:15:53 +02:00
benoitc
78478de364 fix pythonpath option.
fix #501
2013-04-03 11:09:12 +02:00
Konstantin vz'One Enchant
22c55e095f Merge pull request #507 from rgbkrk/patch-1
Verb fix in README.rst
2013-04-01 05:40:04 -07:00
Kyle Kelley
54db5e0b46 Verb fix in README.rst 2013-03-24 18:06:33 -03:00