2313 Commits

Author SHA1 Message Date
Vivian Ho
b034c81654 merge 2016-06-02 10:52:43 -07:00
benoitc
4d845f2ae4 fix pep8 warnings 2016-05-31 15:48:39 +02:00
Berker Peksag
0d00a280bd Python 2.6 is the minimum supported version now 2016-05-30 11:01:43 -07:00
Adam Chainz
f722a6eb65 Convert readthedocs link for their .org -> .io migration for hosted projects (#1286)
As per [their blog post of the 27th April](https://blog.readthedocs.com/securing-subdomains/) ‘Securing subdomains’:

> Starting today, Read the Docs will start hosting projects from subdomains on the domain readthedocs.io, instead of on readthedocs.org. This change addresses some security concerns around site cookies while hosting user generated data on the same domain as our dashboard.

Test Plan: Manually visited all the links I’ve modified.
2016-05-29 11:46:37 -07:00
Randall Leeds
2855d4f661 Merge pull request #1281 from edgarcosta/silent
timeout setting, rewrote what it means for a worker be silent
2016-05-26 18:29:51 -04:00
edgarcosta
2f0e99e71d timeout setting, what it means to be silent 2016-05-23 22:27:08 -04:00
Benoit Chesneau
eba1b5a822 Merge pull request #1279 from edmorley/docs-fixes
Docs: Spelling corrections & markup tweaks
2016-05-23 20:28:41 +02:00
Ed Morley
c4e0e7775e Docs: Spelling corrections & markup tweaks
Fixes the changelog bullets added for #1252, as well as a number of
spelling corrections and markup improvements.
2016-05-23 17:22:50 +01:00
benoitc
0b84f070cf 19.6 has been released. 2016-05-23 17:30:23 +02:00
benoitc
4a04195975 update 19.6.0 changelog 2016-05-21 11:21:53 +02:00
benoitc
37be319f06 add a not in FAQ about the SENDFILE environment var 2016-05-21 11:12:11 +02:00
benoitc
d5a07ce4ff Allow disabling sendfile via an environment variable
add support for the `SENDFILE` environment variable.

fix #1252
2016-05-21 11:06:51 +02:00
Benoit Chesneau
fed56176e5 Merge pull request #1277 from benoitc/fix/1258
gthread: handle removed socket in the select loop
2016-05-21 10:53:20 +02:00
Benoit Chesneau
be70754ede Merge pull request #1276 from benoitc/fix/1271
add --capture-output setting

redirect stdout/stderr to logfile
2016-05-21 10:51:41 +02:00
benoitc
49ebee1386 redtirect stdout/stderr to logfile
Add the new setting `--caapture-output` to capture output from stdout/stderr to the current log file.

fix #1271
2016-05-21 10:50:32 +02:00
benoitc
44d3ac8451 gthread: handle removed socket in the select loop
when it happend there are good chance the socket has been removed because it timeouted on the other end. So ignore it.

fix #1258
2016-05-21 00:13:57 +02:00
Benoit Chesneau
df55657282 Merge pull request #1273 from wipply/pre-exec-environment
Allow to modify environment in pre_exec callback
2016-05-21 00:11:11 +02:00
benoitc
20bde96e14 prepare 19.6.0 release 2016-05-20 16:10:35 +02:00
Benoit Chesneau
c62cf2f500 Merge pull request #1270 from benoitc/improve-arbiter-promotion
remove file locking
2016-05-20 15:56:35 +02:00
Benoit Chesneau
118668c8d6 Merge pull request #1274 from benoitc/revert-1266-improve_lockfile
Revert "lockfile improvements"

committed by error...
2016-05-20 15:56:22 +02:00
Benoit Chesneau
b4dc48dc02 Revert "lockfile improvements" 2016-05-20 15:55:55 +02:00
Benoit Chesneau
3186473e42 Merge pull request #1266 from benoitc/improve_lockfile
lockfile improvements
2016-05-20 15:55:46 +02:00
benoitc
418f140445 remove file locking
This changes improve the binary upgrade behaviour using USR2:

- only one binary upgrade can happen at a time: the old arbiter needs to be
  killed to promote the new arbiter.
- if a new arbiter is already spawned, until one is killed USR2 has no action
- if a new arbiter has been spawned, the unix socket won't be unlinked
- until the old arbiter have been killed the newly created pidfile has the name
  <pidfile>.2 and the name Master.2 .

Note: there is no dialog between both arbiters to handle this features.
Instead they will supervise each others until one is killed. So isolation is
still guaranted.

fix #1267
2016-05-20 15:42:55 +02:00
benoitc
39f62ac66b make sure to remove the signal from the worker pipe
The signal was never removed from the pie which was always waking up the worker
triggering a CPU spike.

fix #1269
2016-05-20 11:40:20 +02:00
Krzysztof Urbaniak
0bd2faa2e7 Allow to modify environment in pre_exec callback 2016-05-17 12:02:02 +02:00
benoitc
062b48d8d2 lockfile improvements
- rename LockFile.lock  to acquire
- rename LockFile.unlock to release
- move the lockfile management in sepate functions inside the arbiter
- remove the "closed" argument from the socket.close method and add a new "destroy" function that will be called whent  the socket can be unlinked (cal release)
- fix tests
2016-05-15 02:30:08 +02:00
Benoit Chesneau
f8e14a53b2 Merge pull request #1261 from benoitc/fix/1129
don't kill ourself on reload
2016-05-15 01:53:26 +02:00
Benoit Chesneau
01f83691e6 Merge pull request #1263 from benoitc/fix/1259
fix unix socket locking
2016-05-14 23:11:17 +02:00
benoitc
8a6748ee65 fix unix socket locking
This change add proper file locking to gunicorn. By default "gunicorn.lock" is created in the temporary directory when a unix socket is bound.  In case someone want to fix the lock file path or use multiple gunicorn instance the "--lock-file" setting can be used to set the path of this file.

fix #1259
2016-05-14 22:03:40 +02:00
benoitc
d3307cdfa5 add an app example using readline 2016-05-14 17:29:01 +02:00
benoitc
fbe865f37a fix issues links 2016-05-13 21:01:43 +02:00
benoitc
e5d27516cf makes sure to execute the hook and exit cleanly 2016-05-13 20:25:29 +02:00
Randall Leeds
aadbddb622 Merge pull request #1260 from daavve/master
added some more detail for setting up gunicorn on systemd
2016-05-13 09:49:38 -07:00
Berker Peksag
26c67f8d3f Merge pull request #1262 from vishesh92/patch-1
Fix note for design.rst
2016-05-13 17:05:38 +03:00
vishesh92
58987b27fb Fix note for design.rst 2016-05-13 19:25:00 +05:30
benoitc
3cbbc713b1 don't kill ourself on reload
Killing ourself when using the `--reload` option trigger an infinite loop under some monitoring services like the one in pycharm and don't reload the file.

Instead set self.alive as False which will trigger later the worker exit. Note that if we want to force the exit we could also use sys.exit(0) .

fix #1129
2016-05-13 11:09:14 +02:00
David McInnis
d27bf96690 fixed typo where we start the wrong service 2016-05-12 11:52:27 -07:00
benoitc
8e8611a741 add debuginfo when retrying socket creation 2016-05-12 09:34:05 +02:00
David McInnis
35f9e3e77c added some more detail for setting up gunicorn on systemd 2016-05-12 00:33:39 -07:00
Benoit Chesneau
081f8eec08 Merge pull request #1254 from jgehrcke/jp/exclog
Do not swallow exception raised during worker exit
2016-05-11 21:58:06 +02:00
benoitc
7c2584e073 19.5 is tagged 2016-05-11 21:33:50 +02:00
Jan-Philip Gehrcke
66a07032ba docs: clarify that worker_exit hook runs *in* the worker 2016-05-11 13:36:31 +02:00
Jan-Philip Gehrcke
f4842a5ab8 Log exception occurring during worker exit 2016-05-11 13:36:28 +02:00
benoitc
7d61a60ebd add changelog
releae often shoudl be our mantra. We have too much fixes in that release that
were waiting since a while. Let's start a month release (ore more) from now.
2016-05-10 21:43:06 +02:00
Benoit Chesneau
58f190d346 Merge pull request #1257 from benoitc/fix/1256
unblock the wait loop under python 3.5
2016-05-10 21:14:47 +02:00
benoitc
b0c0333248 unblock the wait loop under python 3.5
in python 3.5 the select is blocking when waiting for it which prevent quick
exit on SIGTERM.

The problem is described:
https://www.python.org/dev/peps/pep-0475/#backward-compatibility

This change fix it by listening for signal event on the worker pipe. Once an
event is triggered it will forcefully wake up the select and return.

fix #1256
2016-05-10 09:08:17 +02:00
Phil Jones
9d158bec94 Add access_log_format to config example (#1251)
The example given is the current default log format.
2016-05-03 14:15:36 +03:00
benoitc
ded610ede9 add a note about the requirements of the threads workers under python 2.x
fix #1200
2016-05-02 15:44:38 +02:00
benoitc
6f9ae5ee2f put a note that error logs are only errors from Gunicorn.
fix #1124
2016-05-02 15:41:16 +02:00
benoitc
65db610afe print error logs on stderr and access logs on stdout
fix #1184
2016-05-02 15:26:15 +02:00