Also simplifies the environment handling in the gevent_pywsgi
server so that it also has this key. An added side effect is
that the gunicorn FileWrapper gets set for the gevent_pywsgi
worker, too.
Fixes#486
This commit closes the loop on fd6c712.
Aforementioned commit fixed observable problems in my testing with
gevent 1.0 release candidates but the explanation given at the time
was curiously bogus. It came from a misreading of pools and servers
as used in the ggevent worker.
With this change, both versions of gevent should support graceful
and non-graceful shutdown.
This change should improve interaction with reloaders and ensure that
ports are not stuck open if the arbiter gets a hard kill signal or
otherwise exits during any graceful or non-graceful shutdown.
Allows gunicorn to listen on different interface. It can be either ipv6,
unix or ipv4 sockets.
Ex:
gunicorn -w3 -b 127.0.0.1:8001 -b 127.0.0.1:8000 -b [::1]:8000 test:app
fix#444
server.stop() are blocking worker and which is then may be killed by Arbiter.murder_workers() with timeout (not graceful_timeout). It's issues when graceful_timeout > timeout.
This change add gtraceful timeout option. This timeout is different than
the worker timeout and can be extended to handled a longer delay before
closing a running connection.
Patch based on the one given by @sirkonst with some edit + support of
the eventlet worker.
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.)
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.
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.