Hello,

I am using mod_wsgi 2.3 with Apache 2.2.11 on Ubuntu 9.04.

I seem to be having problems where the code I put in on of my WSGI
application files, (django.wsgi) is affecting the (sub) interpreters
of other WSGI applications.

Here is the relevant part of the django.wsgi file:
----------
...
import warnings
warnings.filterwarnings(action="ignore",
    message="^the sets module is deprecated$",
category=DeprecationWarning,
    module="MySQLdb", lineno=34)

# Determine the absolute path of the Django project directory that
contains
# this
project.
...

# If the Django project directory is not in the Python path, add
it.
...

os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_PROJ + '.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
----------

In the above WSGI application file, I suppress a warning emitted by a
particular module. I expected this warning to be suppressed only for
this one WSGI application, but this is not the case. Say I go to /
site1 where the WSGI application file suppresses the warning, then
sure enough, there will be no warning in the Apache error log.
However, if after visiting that WSGI application, I now go to /site2
(another WSGI application that doesn't have that warning suppressed),
the warning does not show up.

Yet, if I restart Apache and visit /site2 first, the warning will
appear in the log.

I am running mod_wsgi in daemon mode with multiple WSGI applications.
All the applications are running within the same process group;
however, I can change this if I need to. I am using the Apache prefork
MPM, and I have only one virtual host.

I know this problem seems small and insignificant, since it is just
affecting spam output to the Apache error log. However, it signals a
larger problem for me: it means that my WSGI applications are somehow
sharing state, which I don't want.

Thanks,
Malcolm

--~--~---------~--~----~------------~-------~--~----~
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