Here is the bug report have lodged against Python with potential fix.

http://bugs.python.org/issue13156

Basically your screwed if you want to use Python 2.7.2 or 3.2.1+ and
fork sub processes from application running in mod_wsgi sub
interpreters.

You are forced to use the main interpreter.

To work around the problem in mod_wsgi would require a very naughty
hack to force initialisation of auto thread state for main interpreter
and then manipulate its reference count manually up by one so it isn't
auto deleted.

Graham

On 9 October 2011 16:24, Graham Dumpleton <[email protected]> wrote:
> Unless you have:
>
>  WSGIApplicationGroup %{GLOBAL}
>
> you are running in a sub interpreter of the daemon process.
>
> The %{GLOBAL} value to that directive says to use the main interpreter.
>
> Graham
>
> On 9 October 2011 15:59, Ron Garret <[email protected]> wrote:
>>
>> On Oct 8, 2011, at 6:08 PM, Graham Dumpleton wrote:
>>
>>> The only way to reproduce it is going to be wrote a C program which
>>> embeds Python and manually initialises Python via C API and then
>>> creates sub interpreter, manages sub interpreter thread states
>>> correctly and then executes problem code in the context of that. It
>>> isn't straight forward thing that most would be able to do. Sub
>>> interpreters can [not] be created from pure Python code so must use C code.
>>> Is that what you have done so far to replicate it standalone?
>>
>> No, I did a pure-python test.  I thought that my mod_wsgi configuration 
>> wasn't using sub-interpreters because I'm running (I thought) in daemon mode 
>> with one process per wsgi application.
>>
>> rg
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "modwsgi" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to 
>> [email protected].
>> For more options, visit this group at 
>> http://groups.google.com/group/modwsgi?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to