[Twisted-Python] Using Twisted inside mod_python
Bob Ippolito
bob at redivi.com
Thu May 5 15:54:36 EDT 2005
On May 5, 2005, at 3:34 PM, jarrod roberson wrote:
> I want to embed a Twisted Server ( specifically a ZeroConf
> implemenation I wrote ) into Apache2.
>
> I have it running from a PythonImport and attaching to an
> interpreter and all that goodness.
> It prints out all the queries and answers it received to the apache
> log just fine. Apache works just fine serving normal stuff.
>
> The problem is anytime I make any kind of method calls into my
> global object from a handler it just hangs Apache2 :-(
>
> I have tried it with worker.c and prefork.c and both exhibit the
> same behavior.
>
> Any suggestions?
I don't think this is going to work. At all. Twisted needs more
control than it's allowed to have from Apache. You'll need to run
all your Twisted stuff in a separate process and ProxyPass it to
Apache (or some similar decoupling).
-bob
More information about the Twisted-Python
mailing list