1617 Commits

Author SHA1 Message Date
benoitc
7f9d745eb5 reuse asyncio code in the threaded worker 2014-05-30 11:07:35 +02:00
benoitc
81810d9f04 reuse the code 2014-05-15 08:03:06 +02:00
benoitc
14f71ebf39 compatibility with python 2
Add support of the threaded worker on python 2.7. python 2.7 has no
futures module. With this change the compatibility module is installed.
2014-05-13 15:18:43 +02:00
benoitc
67800292e0 fix kqueue poller.
this change initialise the event loop after the process has forked so we
make sure to inherit from the file descriptor.

Also fix the number of events we are waiting for. The python
implementation requires a positive number.
2014-05-13 13:57:34 +02:00
benoitc
eadc526192 fix PollPoller 2014-05-13 13:21:14 +02:00
benoitc
6aa99e4441 fix keepalive 2014-05-13 12:30:57 +02:00
benoitc
c353eaacee fix ThreadWorker 2014-05-13 10:29:26 +02:00
benoitc
c8f6269f29 fix the fdevents module 2014-05-13 10:27:49 +02:00
benoitc
67866f275f add missing gthreads worker 2014-05-13 10:21:48 +02:00
benoitc
5f0a329b58 add fdevents module
This module add a new cross platform event poller to gunicorn. It allows
you to listen on different fds in an efficient manner.

On linux it's using epoll, bsd/darwin kqueue...
2014-04-13 08:59:47 +02:00
benoitc
7349c4fb9a add --threads param 2014-03-30 15:27:53 +02:00
Randall Leeds
e42859492c Add Jeryn Mathew to thanks
Thanks, @jerynmathew
2014-03-17 17:00:38 -07:00
Randall Leeds
21ea843db4 Merge pull request #696 from jerynmathew/fix/693-config-pyc
Fix for #693
2014-03-17 16:59:37 -07:00
Jeryn Mathew
b6f3cb8e7c Fix for issue #693
- Added changes to file read, as per review comments
2014-03-17 10:26:53 +05:30
Jeryn Mathew
e1e5d3638f Fix for issue #693
- Remodeled the logic to use imp module to validate the python
	  gunicorn config file
2014-03-15 12:16:18 +05:30
benoitc
4c7b17e996 bump to R19 2014-03-09 07:30:43 -07:00
benoitc
1e8b375038 fix doc and make sure we get the --paste option 2014-03-09 07:28:46 -07:00
Randall Leeds
b35e368515 Remove references to deprecated console scripts 2014-03-08 18:21:36 -08:00
Randall Leeds
e5442332fe Support running specific paster apps from .ini
Close #400
2014-03-08 18:16:03 -08:00
benoitc
3ad5ee9120 fix title levels 2014-03-08 18:13:38 -08:00
benoitc
0d3b8ea379 There should only be one.
gunicron_paster, gunicorn_django and other hacks are deprecated. This
patch only advertise gunicorn as the standard, stable and well supported
command.
2014-03-08 18:09:39 -08:00
benoitc
0e4d9f0378 make sure we return the correct error with the last traceback.
fix #630
2014-03-08 18:01:30 -08:00
Randall Leeds
41e7aba3a9 bad variable reference in paste startup 2014-03-08 17:53:51 -08:00
benoitc
2edb2089ba update doc for django and paster integration
gunicorn_django and gunicorn_paster commands are now deprecated so
remove them from the doc. While I am here, update the integration doc.
2014-03-08 17:46:08 -08:00
benoitc
81241907ff switch QUIT and TERM signal
With this change, when gunicorn receives a QUIT all the workers are
killed immediately and exit and TERM is used for the graceful shutdown.

Note: the old behaviour was based on the NGINX but the new one is more
correct according the following doc:

https://www.gnu.org/software/libc/manual/html_node/Termination-Signals.html

also it is complying with the way the signals are sent by heroku:

https://devcenter.heroku.com/articles/python-faq#what-constraints-exist-when-developing-applications-on-heroku
2014-03-08 17:14:06 -08:00
Randall Leeds
24a060ed02 Reap workers in SIGCHLD handler
This commit tries to minimize the chance of sending a kill signal
to a process that is not a gunicorn worker by reaping children
as soon as the SIGCHLD is received.

Close #371
2014-03-08 15:21:54 -08:00
Randall Leeds
12e5482a4a Merge pull request #711 from berkerpeksag/wheel-universal
Add universal Wheel support.
2014-03-04 17:03:32 -08:00
Berker Peksag
765b8ab48b Add universal Wheel support.
Gunicorn works on both Python 2 and Python 3, so we can create a
universal Wheel distribution.

See https://github.com/pypa/sampleproject/blob/master/setup.cfg for
more information.
2014-03-05 02:23:38 +02:00
Randall Leeds
4baaa08beb Merge pull request #710 from berkerpeksag/patch-1
Remove duplicate classifiers.
2014-03-01 15:52:27 -08:00
Berker Peksag
3783bc79f4 Remove duplicate classifiers. 2014-03-01 00:19:30 +02:00
Randall Leeds
a01a224e66 Merge pull request #697 from benoitc/issue/694
Issue/694
2014-02-23 12:26:03 -08:00
Benoit Chesneau
5ffa339fb5 Merge pull request #707 from qrilka/patch-1
gafferp renamed to gaffer
2014-02-22 14:31:00 +01:00
Kirill Zaborsky
9ce722e638 gafferp renamed to gaffer 2014-02-21 17:14:31 +03:00
Randall Leeds
88ccfdb981 Clean up some inconsistent in error handling
It is more DRY to let the exception here bubble.
2014-02-20 03:47:49 -08:00
Randall Leeds
6f1d3362c5 Merge pull request #686 from benoitc/web-concurrency
Honor $WEB_CONCURRENCY environment variable.
2014-02-20 02:17:00 -08:00
Randall Leeds
dc7dc14229 More logging.conf example typos 2014-02-20 02:00:23 -08:00
Randall Leeds
55afb41532 Merge pull request #703 from wking/701-consolidate-config-log
arbiter: Consolidate configuration logging
2014-02-14 15:34:49 -08:00
W. Trevor King
64f98a0a1c arbiter: Consolidate configuration logging
Benoit prefers the log prefix for the first line ("Current
configuration:") but not subsequent lines (" {config}: {value}") [1],
so consolidate to a single log.debug call.  The newer '{0}'.format()
syntax requires Python 2.6 [2], but our setup.py only claims
compatibility with 2.6, 2.7, 3.2, and 3.3, so that should be fine.

[1]: https://github.com/benoitc/gunicorn/pull/701/files#r9767234
[2]: http://docs.python.org/2/whatsnew/2.6.html#pep-3101-advanced-string-formatting
2014-02-14 15:15:35 -08:00
Randall Leeds
2b3f63601b Add documentation for WEB_CONCURRENCY 2014-02-14 15:12:21 -08:00
Randall Leeds
97977e41ab Merge pull request #701 from wking/700-debug-preload
Deprecate the --debug setting
2014-02-14 15:08:40 -08:00
Randall Leeds
2ee1c26ec8 Merge pull request #702 from berkerpeksag/use-email-utils-formatdate
Use email.utils.formatdate in gunicorn.util.http_date.
2014-02-14 14:43:14 -08:00
Berker Peksag
5c78adf9b9 Use email.utils.formatdate in gunicorn.util.http_date.
There is a also an open issue for CPython:

http://bugs.python.org/issue747320
2014-02-14 02:26:09 +02:00
W. Trevor King
2277901a72 Deprecate the --debug setting
"Limits the number of worker processes to 1" hasn't been true since
06a4dc6 (fix one error in gunicorn_paster, global conf was ignored,
2010-06-22), although it was true when the line was added in 3c7d532
(Large refactor of the documentation and website, 2010-05-22).

"changes some error handling that's sent to clients" hasn't been true
since feb86d3 (don't display the traceback in the HTTP response,
2013-09-27).

The only remaining actions that --debug had were disabling --preload
and hiding debug-level config logging.  The former seems useless (just
disable --preload directly) and the latter at doesn't seem useful
enough for a new setting (just turn down --log-level).  With this
commit, --preload always works and you always get debug-level config
logging.

I left a stub Debug entry in gunicorn.config, which we can leave in
place while folks convert any gunicorn scripts and configurations to
drop --debug.  When the time comes, we can just remove that entry.  I
also the boolean-config tests to use --preload, since that will still
be around after we remove the dummy Debug entry.

Fixes #700.
2014-02-13 12:40:41 -08:00
Kenneth Reitz
0b6077accc Merge pull request #699 from berkerpeksag/patch-1
Fix a typo.
2014-02-11 12:20:36 -05:00
Berker Peksag
1e48a4071a Fix a typo.
environement -> environment
2014-02-10 21:21:03 +02:00
Randall Leeds
b981014acc Log exceptions that occur after response start
Fix #694
2014-02-06 19:31:22 -08:00
Randall Leeds
56b9fca562 Merge pull request #690 from levigross/master
Invalid user supplied messages should be HTML entity escaped.
2014-02-06 12:45:34 -08:00
Kenneth Reitz
64144c732f Use $WEB_CONCURRENCY environment variable for default workers value 2014-02-06 11:44:52 -08:00
Jeryn Mathew
2e84d68edb Fix for issue #693
- Override older behavior of execfile_ with one with pyc patch
2014-02-06 13:18:58 +05:30
Jeryn Mathew
8b49de4ad2 Fix for issue #693
- Made changes to read and fetch code object from .pyc files.
  - Error message "Non-ASCII character '\xf3' in file" is resolved.
2014-02-06 13:12:31 +05:30