qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Freeman <ke1g...@gmail.com>
Subject Re: Python Connections Hang from Subprocesses
Date Wed, 07 Aug 2013 18:00:42 GMT
Subprocesses (using the subprocess module, or even the older exec stuff, as
opposed to threads, or even forked clones) are relatively trouble free in
python (except maybe on Windows, whose process model has that Microsoft
difference).  I've certainly made multiple connections to a broker from one
python process, as well as using tools like spout and drain, which are both
written in python, while my main development project is running connected.

Maybe there are broker configuration items which can affect this.  If so, I
hope that someone knowledgeable will speak up.  But I doubt that this is
the problem.

Are you sure that your subprocess runs?  It might be trying to report an
error to you.  Of, if you have pipes configured for interaction with the
invoking processor, it might be waiting on one of those.

You could, temporarily, instead of your intended code, have the subprocess
invoke something like BasicHTTPServer, and see if you can interact with it
using your browser.  If that also fails, it leaves the broker connection
out as the source of your problems.

Possibly easier is to have it log its arrival at various points, so you can
be sure where it is getting stuck.  If you've already confirmed that it's
in the broker connect, forgive me, and wait for a better answer.

Bill


On Wed, Aug 7, 2013 at 12:55 PM, Eagy, Taylor <teagy@blackbirdtech.com>wrote:

> Hello,
>
>
>
> I'm having an issue connecting multiple Python subprocesses to the qpid
> C++ broker. I have a main Python process that imports qpid.messaging at the
> top and spawns a few multiprocessing.Process objects that try to create a
> Qpid connection to the broker. Before I spawn the processes though, the
> main process creates a connection to the Qpid broker just fine, but all of
> the subprocess code hangs when it trys to connect to the qpid broker. I
> know qpid is supposed to be multi-threaded, but what about multiprocess
> with Python? What could be causing the connections to hang from the
> subprocesses? Is there some singleton object that isn't getting released
> that's blocking the other subprocesses from connecting?
>
>
>
> Thanks,
>
> TJ
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message