I'm curious. Do mules still get "polluted" with app code if you enable 


On 10 August 2017 2:07:56 AM AEST, Nate Coraor <n...@bx.psu.edu> wrote:
>Hi all,
>I've been testing mules a lot lately. I started off with programmed
>but eventually discovered that mules work in the traditional
>method, and this occurs after the master has fully loaded, at the same
>that workers are forked.
>This messed up some pieces of my application in the mules because they
>using postfork hooks that fired too early (at the fork from master,
>exec). I got that straightened out but this led me to wonder whether I
>could just use unprogrammed mules instead.
>With programmed mules we're just loading the same application as the
>process, without the wsgi stack on top. It'd be quicker and simpler if
>mules could just be forks from the master. The documentation says that
>unprogrammed mules are "signal only", however.
>Turns out, most things seem to work, except that message passing has
>intermittent problems and signals are not always passed. For example, I
>send mule messages, but occasionally they fail (I believe this is being
>raised in a worker):
>line 194, in mule_msg_dispatcher
>    msg = pickle.loads(message)
>cPickle.UnpicklingError: invalid load key, '{'.
>Where '{' is the first character of the message string.
>Signals do typically propagate to mules with --py-call-osafterfork set,
>I have found that sometimes they don't (if the mules are blocked on
>mule/farm_get_msg??) unless I send a mule message from a worker after
>signalling, regardless of whether the mule actually seems to receive
>message (which it does not always do).
>tl;dr, should I keep trying to debug this (I think maybe it's because
>the way I'm handling things postfork) or should I not expect
>mules to work with messages?

Sent from my Android device with K-9 Mail. Please excuse my brevity.
uWSGI mailing list

Reply via email to