[Twisted-Python] Strange blocking in twisted + quickfix service
robparrott at gmail.com
Wed Nov 15 14:27:29 EST 2006
I'm trying to wrap the quickfix engine (www.quickfix.org) with a
twisted service, in order to create a standalone daemon that will
respond to RPC-like commands (such as "start", "stop", "request
quote", etc.) However, I'm finding some odd blocking issues that I
need to resolve.
Basically, the twisted service works fine until I start the quickfix
engine (which runs, I believe in a separate thread). Beforehand, calls
to the twisted protocol class I've created invoke methods in the
service, and things don't block. When the quickfix engine is started,
it runs fine, but the main thread, in which the twisted "wrapper"
application runs, seems to block in funny ways.
As an example of this behavior, a connection to the LineReceiver
protocol class I've subclassed will start to execute, but hangs
exactly 12 minutes before proceeding. I.e. the time between telnetting
to the port on which the server is listening and entering a command,
and the time when the logs record that the "lineReceived" method of
the LineReceiver class is invoked, is 12 minutes.
As far as I can tell, everything is running in the same thread except
for the quickfix engine class, so I'm not sure what the hanging
behavior is due to. My understanding is that the twisted.python.log
module, which I'm using to log, is non-blobking, and so shouldn't be
causing this behavior.
Does anyone have any ideas into what might be causing the hang, and
approaches to diagnosing the cause?
Thanks so much,
More information about the Twisted-Python