I have an auth-backend inheriting from model backend that works on 1.3.x
and 1.4.x but does not work on 1.5.x. The only difference between the
systems is the version of Django.

After much comparing and cursing and tearing of hair, it turns out what has
changed is how Django behaves under mod_wsgi with WSGIDaemonProcess under
Apache 2.2.22 prefork.

This works regardless:

WSGIDaemonProcess foo processes=1 threads=20 ...
WSGIDaemonProcess foo processes=1 threads=1 ...
WSGIDaemonProcess foo threads=1 ...
WSGIDaemonProcess foo ...

This no longer works with Django 1.5:

WSGIDaemonProcess foo processes=20 threads=20 ...
WSGIDaemonProcess foo processes=20 threads=1 ...
WSGIDaemonProcess foo processes=20 ...

The system is supposed to be running with
WSGIDaemonProcess foo processes=20 threads=20 ...

In sum: threading is ok, multiple processes is not. Furthermore, the
default RemoteUserBackend works, the one inheriting from ModelBackend does
not.

The problem seems to be that after successful authenticatiion and login,
the session (cookies) isn't changed, since after a redirect, request.user
is AnonymousUser.

According to http://code.google.com/p/modwsgi/wiki/ProcessesAndThreading,
how processes/threads are set up affects how shared data (globals, like
module variables) are treated. I'm therefore wondering if somehing changed
in how Django's wsgi deals with globals, or if there is change in globals
usage in the auth backend system that will account for this.

Before I start making a publishable minimal version of the login backend
that still fails, I'd like to know:

1. Are other people seeing this?
2. Is this affecting other parts of Django than just auth backends?
3. What other things should I be looking for?

Should there be a warning in the docs at least, that "processes" with
WSGIDaemonProcess should be 1 or unset?


HM

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CACQ%3DrrckZd-WNUcg9Vc1FWuPHCvqjuy8pNeyORxsCuo%3D01su9g%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to