WoLpH
179b87639c
removed python string formatting from logging to enable log message grouping
2011-05-11 23:11:36 +02:00
denis
2ab4bbf46f
fix compatibility with gevent 0.14 dev version
...
Move "import gevent.wsgi" into a separate module, which is not
imported if pywsgi worker is requested. (The gevent.wsgi currently
not provided by gevent trunk but pywsgi works fine.)
2011-05-11 23:11:03 +02:00
benoitc
ba89a400dc
we don't do anythiung in __init__, remove these lines.
2011-03-03 10:36:14 +01:00
benoitc
16fd5d3c20
remove some useless code. pyflakes my friend.
2010-12-22 19:52:34 +01:00
Paul J. Davis
07f0c0f21d
Fixes signal reaction times.
...
After messing around trying to make this more elegant we've decided to
just slap a 1s poll to the thing which seems to fix various bugs in the
async event handling.
2010-12-20 08:15:45 -05:00
benoitc
2e39db265c
rather than sleeping the timeout, just test if time is elapsed, then
...
notify. Speed graceful reload and exit.
2010-12-12 22:57:50 +01:00
benoitc
a8e34ac16c
send appropriate error status on http parsing. Fix issue #132 .
2010-12-12 14:16:31 +01:00
benoitc
95a4af2a9c
display the right error when a worker can't be used.
2010-10-28 06:13:57 +02:00
benoitc
939b459c38
don't notify so much the arbiter. spotted by @davisp & @prencher . tests are ok.
2010-10-28 06:13:45 +02:00
benoitc
7715199b48
it's better to test when you use the right code to do it. We had a
...
blocking operation django example (we read a file already on the fs and
recreate another which blocked async schedulers).
While I'm here ease the code of eventlet worker. Just use the convenient
eventlet.serve function which already manage what we do and revert sopme
useless changes in body and header parsing.
2010-09-02 14:55:56 +02:00
benoitc
8d089f95f9
workaround to prevent segfault with current gevent on osx. Disable
...
kqueue.
2010-09-01 11:30:20 +02:00
benoitc
5c498b6a89
do the same for others.
2010-09-01 10:30:30 +02:00
benoitc
c41d3edd36
notify before stopping.
2010-09-01 10:28:14 +02:00
benoitc
5ff6cd173f
prevent GreenletExit exception. But we still have a warning :
...
http://code.google.com/p/gevent/issues/detail?id=41
2010-09-01 09:46:01 +02:00
benoitc
ed66b8b129
some fixes
2010-08-12 11:30:07 +02:00
benoitc
bf9d48be68
typo spotted by sjampoo on irc
2010-08-12 10:49:27 +02:00
benoitc
d2c10a95e4
dramatically improve the gevent worker.
2010-08-12 10:44:06 +02:00
benoitc
cf6747dd86
fix gevent & eventlet workers
2010-08-11 17:00:03 +02:00
benoitc
568f9c3ee1
new gevent worker. Use event to read on socket. Also don't notify so
...
often the fs
2010-08-11 16:28:18 +02:00
benoitc
80cd1f40ed
don't use core.read_event it's not needed here since we balance only
...
when a connection come
2010-08-11 13:55:50 +02:00
benoitc
0616e30e90
clean exit
2010-08-11 13:20:02 +02:00
benoitc
e8bc2cdae8
row link should be set in acceptor not in _acceptor
2010-08-11 10:35:53 +02:00
benoitc
8b2a5c42f7
improve gevent worker.
2010-08-11 10:27:42 +02:00
Randall Leeds
dbd66b6191
work around evdns not playing well with fork
2010-07-22 14:26:37 -07:00
Benoit Chesneau
ae721f00d0
fix SERVER_PROTOCOL in WSGI environ and fix gevent one.
2010-07-16 12:49:23 +02:00
Paul Davis
d09f85edf0
Minor tweaks to new Gevent workers.
...
Just a slight rearangement and added some docs so I can remember which
worker is which in the future. Also renamed all occurrences of GEvent
to Gevent to have consistency.
2010-07-14 18:27:35 -04:00
Benoit Chesneau
8014555636
add full support for gevent. There is now 3 workers allowing us to use gunicorn with
...
gevent :
- egg:gunicorn#gevent : gevent with gunicorn HTTP/WSGI parser
- egg:gunicorn#gevent_wsgi : gevent.wsgi server
- egg:gunicorn#gevent_pywsgi : gevent.pywsgi
2010-07-14 23:45:44 +02:00
benoitc
3b8e594200
remove this exit here
2010-07-08 18:55:13 +02:00
benoitc
46e8002ffc
Fix a bug spotted while testin parser in restkit.
2010-06-26 22:53:18 +02:00
benoitc
a461817309
fix websocket with protocol 076. Fix from tom on irc. Thanks!
2010-06-24 16:20:48 +02: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
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
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
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
Paul J. Davis
51f1f22665
Refactoring worker code.
...
Also went through gunicorn.main lightly.
2010-04-15 20:08:28 -04:00