[uWSGI] Incompatibility between PyZMQ and uWSGI
jjjaime at gmail.com
Thu Nov 25 18:20:58 CET 2010
Thanks. I've modified the sample to:
def application(environ, start_response):
context = zmq_context.context
socket_push = context.socket(zmq.PUSH)
and now it works. Probably this is an awful solution because a new context
is generated for every request (although I'm not sure)
Would you mind to provide a link to the patch? I couldn't find it. Do you
recommend us to take the latest version of your repository?
I will think about this issue to make my project work in uWSGI.
Thanks for your support,
> If you put the initialization out of the application callable, multiple
> worker processes will use the same socket as
> the fork() is called after module loading.
> If you use a single uWSGI worker (without master) it should work normally.
> The right approach is applying the post_fork_hook patch (you will find it
> in the list archive, or you can use the current mercurial tip
> that already includes it) and define a function to be called after every
> fork (so you will put context initialization in it)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the uWSGI