[mod_python] Re: child process XXXX still did not exit, sending a SIGTERM

Martin Blais blais at furius.ca
Tue Jan 3 16:34:37 EST 2006

On 1/3/06, Martin Blais <blais at furius.ca> wrote:
> Hi Graham
> I applied the patch at the link you mention, and it does not resolve
> the issue.  The problem still occurs.
> I read the discussion, and I gather from it that there is an issue
> with using multiple interpreters.  This is my case: I have two
> separate web apps using a python handler with different names.  I
> suppose I don't have a choice, right?  I couldn't specify two
> different apps in the same interpreter, if I have some globals in some
> of the common imported modules?

I also tried now with a single interpreter, the problem is still
there, named explicitly or not.

After much hacking (all day today), I added the explicit
Py_EndInterpreter calls and it still hangs on destruction. 
Specifically, it hangs on PyImport_Cleanup() in Py_EndInterpreter(). 
I'm having trouble pinpointing exactly which symbol makes it hang.  It
seems to happen when cleaning the logging module.  I saw that logging
register an atexit hook, tried to remove that, does not fix the

Patch on the latest beta (3.2.5b) to come at some point.  I need to
rip out my horrible tracing code that I inserted all over the place.

Why do we need to create a new thread state on every handler call?  Is
this for  MPM worker support?

More information about the Mod_python mailing list