benoitc
a8e34ac16c
send appropriate error status on http parsing. Fix issue #132 .
2010-12-12 14:16:31 +01:00
benoitc
ac1688fe9b
fix temporary file leaking .
2010-11-20 16:51:52 +01:00
Paul J. Davis
fc96d45838
Set the correct Connection header in sync workers.
...
We forgot to force this when we changed to HTTP/1.1 responses for the
async worker classes. Thanks to @russss on Twitter for the report.
2010-11-08 12:55:08 -05:00
Paul J. Davis
011ae33c0a
Make sure that post_request is called.
...
Fixes #119
2010-11-03 13:28:48 -04: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
4ed9901708
fix max-requests from @davisp and me, reviewed by @davisp
2010-09-02 21:59:02 +02:00
benoitc
66cc6975d1
useless log.
2010-09-02 21:59:02 +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
Paul J. Davis
7e4ca4b809
Implementation of the max-requests feature.
...
Works on sync and eventlet works. Doesn't work on gevent_pywsig or
gevent_wsgi workers as we don't control their main loops. Tornado
workers appear to be broken.
Worst of all, this causes vanilla gevent workers to segfault. I'm
waiting to see if there's a known issue before considering what to
do next. Worst case we could refuse to run with the bad combination
of settings.
2010-09-01 11:32:26 +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
87296d5bc6
fix an issue. found when reviewing Jonas Borgströ patch. thanks!
2010-08-24 19:50:23 +02:00
Paul J. Davis
abb4f2a765
Reseed the random number generator after fork().
...
Web applications use random numbers for things like sessions, if
we don't reseed then each worker will generate the same sequence
of random numbers which can lead to security concerns.
Thanks to Jonas Borgström for the patch.
2010-08-19 19:01:16 -04:00
benoitc
3979c3dd40
bump
2010-08-12 13:52:00 +02:00
benoitc
b281ec002b
fix worker timeout.
2010-08-12 13:10:56 +02:00
benoitc
5df427b5cb
oups
2010-08-12 12:22:54 +02:00
benoitc
7300502605
dramatically improve eventlet worker
2010-08-12 12:18:41 +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
1ac15b4bb2
some fixes in eventlet worker
2010-08-11 18:27:07 +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
2ddbe800a5
clean a little the eventlet worker
2010-08-11 14:08:32 +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
e64c47475b
fix issue #80
2010-08-11 11:31:35 +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
jbergstroem
0d67447d19
Add pre/post request hooks
2010-07-23 20:41:16 -04: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
Benoit Chesneau
40146dfe4f
denik: acceptor = gevent.spawn(server.serve_forever) --- can just write
...
server.start() - it's asynchronous
go for it then.
2010-07-14 23:28:36 +02:00
Benoit Chesneau
3be6826ea1
rewrite ggevent2 workerr to support last gevent 0.13. a lot more stable
...
and faster than it was. gevent 0.13 give new streaming possibilities and
keepalive.
2010-07-14 23:18:59 +02:00
benoitc
9af95b7f8d
osi.waitpid patching is broken in eventlet and prevent arbiter to exit.
...
Waiting upstream fixes, don't patch it for now.
2010-07-08 19:30:55 +02:00
benoitc
3b8e594200
remove this exit here
2010-07-08 18:55:13 +02:00
Paul J. Davis
e12e77765a
Ignore StopIteration in HTTP parser.
...
We're specifically throwing the stop iteration to signal that a
connection was closed before data appeared (which is necessary for
the Keep-Alive processing). While a bit confusing for sync workers
as there's no Keep-Alive, it is an expected behavior.
Closes #65
2010-07-07 20:25:34 -04: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
benoitc
9bc19c2c86
wsgi.multiprocess depends on number of workers.
2010-06-22 19:24:43 +02:00
benoitc
da91ec5e93
fix issue #63 . thanks!
2010-06-17 00:10:05 +02:00
Paul Davis
645938f2b9
Fix gevent2 worker shutdown.
2010-06-10 16:38:45 -04:00
benoitc
764d81b742
don't display logs. fix from @davisp.
2010-06-10 22:32:15 +02:00
benoitc
36706c208f
make sure WSGIHandler don't log
2010-06-10 22:23:31 +02:00
benoitc
77a8cb66e6
there's still a bug upstream about dns patching so don't patch it for
...
now.
2010-06-10 22:10:22 +02:00