[uWSGI] Request blocking when using uwsgi+gevent+gevent.subprocess

Igor Katson igor.katson at gmail.com
Wed Oct 23 20:45:41 CEST 2013


As always, thank you Roberto for a quick and helpful response!


On Wed, Oct 23, 2013 at 10:56 AM, Roberto De Ioris <roberto at unbit.it> wrote:

>
> > Hi,
> >
> > I wonder if this is a uwsgi or gevent issue, and if there are any
> > solutions
> > to it.
> >
> > When launching a gevent subprocess in a background greenlet, the request,
> > which spawned the subprocess, is not properly closed, and is not released
> > until the subprocess is over.
> >
> > All other requests work fine, and are not blocked.
> >
> > Here's a working gist with configs
> > launched on Ubuntu 12.04, uwsgi 1.9.18.2, gevent 1.0rc2
> >
> > https://gist.github.com/ikatson/7a290f4e1357fb388f07
> >
> > This behavior can be worked around sometimes by, e.g. inserting
> > time.sleep() into the subprocess thread, so that when the request
> returns,
> > the time.sleep() call is not yet over. Then it works fine. But it's very
> > hacky.
> >
> > Thanks!
> >
>
> Adding --close-on-exec to uWSGI should fix your issue:
>
> http://uwsgi-docs.readthedocs.org/en/latest/ThingsToKnow.html
>
> --
> Roberto De Ioris
> http://unbit.it
> _______________________________________________
> uWSGI mailing list
> uWSGI at lists.unbit.it
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.unbit.it/pipermail/uwsgi/attachments/20131023/87f4e33b/attachment.html>


More information about the uWSGI mailing list