338 Commits

Author SHA1 Message Date
benoitc
5ea58c1af2 pool! 2010-06-10 21:44:43 +02:00
benoitc
ff5adc46a4 setblocking(1) 2010-06-10 21:25:29 +02:00
benoitc
43d0bcbbd3 typo 2010-06-10 21:23:48 +02:00
benoitc
09c3310e21 Use gevent.wsgi 2010-06-10 21:22:06 +02:00
benoitc
acd8d57c9f patch all so we make sure io are patched too 2010-06-03 16:11:57 -04:00
benoitc
c4a77a7e32 fix config bug 2010-06-03 16:11:19 -04:00
benoitc
1ae47ef82f fix rebase 2010-06-03 16:11:18 -04:00
benoitc
516adafcbe fix some errors & add headers. unitests still broken 2010-06-03 16:11:17 -04:00
Paul J. Davis
c8154ea5fd Simplify the gtornado monkey patch a bit. 2010-06-03 16:11:17 -04:00
Paul J. Davis
8ddf3e856e Fix up a couple minor bugs. 2010-06-03 16:11:16 -04:00
Paul J. Davis
0d32ab1356 Initial steps for importing simplehttp. 2010-06-03 16:11:16 -04:00
Paul J. Davis
bcaf21b62c Fix async worker integration. 2010-06-03 16:11:16 -04:00
Paul J. Davis
f02cbc10ed Playing with simplehttp. 2010-06-03 16:10:27 -04:00
benoitc
d9a2579613 naive working integration of simplehttp parser. async worker is slower
than the non async actually for unkown reason and slower than with old
parser.
2010-06-03 16:09:04 -04:00
Paul J. Davis
eb0d54e111 Added monkey patch for threading. 2010-06-02 12:16:00 -04:00
Paul Davis
08773bb654 Fix eventlet epoll error. 2010-06-01 15:26:13 -04:00
Paul J. Davis
12f8215e04 Avoid infinite loops spawning workers.
I noticed with preload that if a worker fails to boot the arbiter will
dutifully respawn it. Only to watch it die again. This patch makes it so
if a worker process exits before making it to the run loop the process
will exit with a special exit code. When the arbiter sees this flag it
will shutdown all processes assuming there is an unrecoverable error.
2010-05-25 19:54:33 -04:00
benoitc
62540cffaa commit changes from @davisp + some fixes 2010-05-22 21:11:25 +02:00
benoitc
f7c91e7e86 load after forking 2010-05-22 20:07:08 +02:00
benoitc
776b158683 add preload_app setting 2010-05-22 19:53:02 +02:00
Paul J. Davis
036f8b50d9 Major refactor of the configuration mechanics.
* All configuration and bootup is handled by the Application objects.

* There is now a strict ordering on the precedence of configuration
settings:

  1. Each option is given a default value of some sort in options.ini

  2. Any detectable framework configuration settings override the hard
     coded defaults for options. Currently, only Paster applications
     have support for this.

  3. Anything that is specified in a Gunicorn configuration file (by
     default gunicorn.conf.py) overrides what was possibly set by a
     framework specific configuration source.

  4. Anything specified on the command line reins supreme. The command
     line is the final authority on a given configuration option.
     Though, not all configuration options are available via command
     line.

* Configuration metadata is pulled from an options.ini. In the future I'll
use this to build the example gunicorn.conf.py and the config.rst file
in docs/site/config.rst.

I haven't tested the differences thoroughly. The next item on my agenda
is to figure out a way to start testing Gunicorn that doesn't make my
eyes bleed.
2010-05-19 13:39:37 -04:00
benoitc
5038c3785a dns monkey patch is broken currently in gevent. Waiting upstream fix it,
don't patch it.
2010-05-12 17:54:37 +02:00
Paul J. Davis
0a46d09c6e Avoid a deadlock when the acceptor loop raises.
An out of file descriptors error was causing the async acceptor loops to
die. The notification process was unaffected so the workers didn't die.

Async workers hitting an error in the acceptor now kill themselves and
rely on the arbiter to restart a new worker in their stead.
2010-05-11 23:33:48 -04:00
benoitc
2bc67cc8b8 better handling of QUIT/HUP soignal to fix issue #49. We want graceful
quit or restart if possible.
2010-05-10 12:25:34 +02:00
benoitc
ba06498d7d fix issue #47 2010-05-09 21:39:45 +02:00
Paul J. Davis
22695ff248 Assume non-web.Application instances are WSGI. 2010-04-26 20:08:05 -04:00
Paul J. Davis
ab25537b67 Fix assumption that tornado.web was imported. 2010-04-26 11:52:10 -04:00
benoitc
5b2f98fca4 fix erros spotted by pyflakes 2010-04-22 19:41:29 +02:00
benoitc
be6035769c update doc 2010-04-22 19:20:33 +02:00
benoitc
090bb8fe29 add timeout support 2010-04-22 19:07:23 +02:00
benoitc
80e0acf9db patch RequestHandler so people know that they use tornado with gunicorn. 2010-04-22 18:45:22 +02:00
benoitc
e9eed6b6e9 fix import in tornado worker 2010-04-22 17:39:49 +02:00
benoitc
8184eb493c add refactor gevent support like we did on eventlet. In the future it
may be better to use Event object. While i'm here move the monkey
patching in its own function used on config so we make sure to patch
only one time and prevent some ugly hack like reinit gevent each time we
spawn (it's better to use patched os.fork from gevent once time).
2010-04-22 14:38:49 +02:00
benoitc
7f36bc1bbd ignore connection reset 2010-04-22 11:54:34 +02:00
benoitc
138605dc43 missing headers 2010-04-16 21:08:11 +02:00
Paul J. Davis
d14389cb68 Added support for Tornado.
Took less than a beer.
2010-04-15 21:20:52 -04:00
Paul J. Davis
0c935d06c7 Got the Sync and Eventlet workers running. 2010-04-15 21:20:17 -04:00
Paul J. Davis
51f1f22665 Refactoring worker code.
Also went through gunicorn.main lightly.
2010-04-15 20:08:28 -04:00