On 07-10-2008, Graham Dumpleton wrote:
>
> 2008/10/6 William Dode <[EMAIL PROTECTED]>:
>>
>> On 04-10-2008, Graham Dumpleton wrote:
>>>
>>> BTW, if I am right, you would see the behaviour you expect to see if you
>>> use:
>>>
>>> WSGIApplicationGroup %{GLOBAL}
>>
>> More or less, it give me alternatively two differents local instances...
>
> Sorry, don't understand how that could be at present. What do you get
> corresponding to each request when you also output debugging:
the apache virtualhost conf :
WSGIDaemonProcess blakie.riol user=wilk group=www-user
stack-size=524288
python-path=/home/web/wilk/pynclude:/home/web/wilk/blakie.riol/pynclude
home=/home/web/wilk threads=1 inactivity-timeout=300
display-name=wsgi-blakie.riol
WSGIProcessGroup blakie.riol
WSGIApplicationGroup %{GLOBAL}
AddHandler wsgi-script .wsgi
the output :
[Wed Oct 08 12:52:47 2008] [error] -- start --
[Wed Oct 08 12:52:47 2008] [error] blakie.riol
[Wed Oct 08 12:52:47 2008] [error]
[Wed Oct 08 12:52:47 2008] [error] False
[Wed Oct 08 12:52:47 2008] [error] False
[Wed Oct 08 12:52:47 2008] [error] <_MainThread(MainThread, started)>
[Wed Oct 08 12:52:47 2008] [error] pid: 12864 id: 3072714848 id.__dict__:
3070588148
[Wed Oct 08 12:52:47 2008] [error] -- start --
[Wed Oct 08 12:52:47 2008] [error] blakie.riol
[Wed Oct 08 12:52:47 2008] [error]
[Wed Oct 08 12:52:47 2008] [error] False
[Wed Oct 08 12:52:47 2008] [error] False
[Wed Oct 08 12:52:47 2008] [error] <_MainThread(MainThread, started)>
[Wed Oct 08 12:52:47 2008] [error] pid: 12864 id: 3072714848 id.__dict__:
3070589644
[Wed Oct 08 12:52:47 2008] [error] -- start --
[Wed Oct 08 12:52:47 2008] [error] blakie.riol
[Wed Oct 08 12:52:47 2008] [error]
[Wed Oct 08 12:52:47 2008] [error] False
[Wed Oct 08 12:52:47 2008] [error] False
[Wed Oct 08 12:52:47 2008] [error] <_MainThread(MainThread, started)>
[Wed Oct 08 12:52:47 2008] [error] pid: 12864 id: 3072714848 id.__dict__:
3070588148
[Wed Oct 08 12:52:47 2008] [error] -- start --
[Wed Oct 08 12:52:47 2008] [error] blakie.riol
[Wed Oct 08 12:52:47 2008] [error]
[Wed Oct 08 12:52:47 2008] [error] False
[Wed Oct 08 12:52:47 2008] [error] False
[Wed Oct 08 12:52:47 2008] [error] <_MainThread(MainThread, started)>
[Wed Oct 08 12:52:47 2008] [error] pid: 12864 id: 3072714848 id.__dict__:
3070589644
[Wed Oct 08 12:53:04 2008] [error] -- start --
[Wed Oct 08 12:53:04 2008] [error] blakie.riol
[Wed Oct 08 12:53:04 2008] [error]
[Wed Oct 08 12:53:04 2008] [error] False
[Wed Oct 08 12:53:04 2008] [error] False
[Wed Oct 08 12:53:04 2008] [error] <_MainThread(MainThread, started)>
[Wed Oct 08 12:53:04 2008] [error] pid: 12864 id: 3072714848 id.__dict__:
3070588148
[Wed Oct 08 12:53:05 2008] [error] -- start --
[Wed Oct 08 12:53:05 2008] [error] blakie.riol
[Wed Oct 08 12:53:05 2008] [error]
[Wed Oct 08 12:53:05 2008] [error] False
[Wed Oct 08 12:53:05 2008] [error] False
[Wed Oct 08 12:53:05 2008] [error] <_MainThread(MainThread, started)>
[Wed Oct 08 12:53:05 2008] [error] pid: 12864 id: 3072714848 id.__dict__:
3070589644
#!/usr/bin/python
import cgi
import threading
import sys
import os
import threading
myloc = threading.local()
def application(environ, start_response):
status = '200 OK'
print >> sys.stderr, '-- start --'
print >> sys.stderr, environ.get('mod_wsgi.process_group')
print >> sys.stderr, environ.get('mod_wsgi.application_group')
print >> sys.stderr, environ.get('wsgi.multithread')
print >> sys.stderr, environ.get('wsgi.multiprocess')
print >> sys.stderr, threading.currentThread()
ch = 'pid: %s id: %s id.__dict__: %s' % (os.getpid(), id(myloc),
id(myloc.__dict__))
print >> sys.stderr, ch
output = ch
response_headers = [('Content-type', 'text/html'), ]
start_response(status, response_headers)
return [cgi.escape(output)]
--
William Dodé - http://flibuste.net
Informaticien Indépendant
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---