[uWSGI] Incompatibility between PyZMQ and uWSGI
jjjaime at gmail.com
Thu Nov 25 09:15:19 CET 2010
Thanks for your help. I've tried to identify why our project does not work
but we couldn't yet. After your message, we've developed a WSGI application
from scratch with the same ZMQ use than in our project and it worked, what
it's really surprising. The main differences between this wsgi app and our
project is that we also use pymongo (to use MongoDB), logging, and little
However the facts are:
- The same project works with wsgiref
- The previous version worked with uwsgi and the only change is the zmq
We'll still work in this issue, to identify the origin of the problem, and
report it in this thread.
On Wed, Nov 24, 2010 at 10:33 AM, Roberto De Ioris <roberto at unbit.it> wrote:
> Il giorno 24/nov/2010, alle ore 10.21, Jaime Fernández ha scritto:
> > Hi Roberto,
> > Thanks for the reply. I've tested with -T flag but it does not work
> > In the ZMQ I've received the following reply (
> which may be helpful:
> > ---
> > I think the issue is that uWSGI likely uses an asynchronous event loop
> underneath with non-blocking sockets. When zeromq/pyzmq is used in that
> context, zeromq socket have to be integrated into the event loop at a very
> low level using:
> > 1) zmq_poll (for zeromq 2.0.x and 2.1.x)
> > 2) ZMQ_FD/ZMQ_EVENTS (for zeromq 2.1.x)
> > The exact point of conflict is that both zeromq and uWSGI are using
> something like poll to handle IO in the event loop. The two event loops
> don't know how to coordinate their activities and end up stepping on each
> other's toes. The only libraries that I know of that handle this (in python
> that is) are:
> > 1) pyzmq.eventloop.ioloop (a tornado-compatible event loop).
> > 2) eventlet
> > ---
> > Unfortunately I don't know how to proceed.
> > Than
> I have studied a bit zeromq.
> If i have understand correctly it is a wrapper for sockets, but i do not
> understand how you are using it.
> Can you post a sample code i can test ? All the example available on the
> zeromq works without problems,
> so i suspect you are using some functionality i do not get.
> Roberto De Ioris
> uWSGI mailing list
> uWSGI at lists.unbit.it
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the uWSGI