Re: Re: Multiple Servers and Authentication Sessions Breaking

2011-03-09 Thread Matthew Roy
@Tom: I'm not configuring SESSION_ENGINE so it should be the default
django.contrib.sessions.backends.db

@Henrik: That may well be the problem, I have a cron job to generate a
random secret key on each server weekly. I will try setting them statically.

Thanks for your responses, I'll let you know how it goes.

Matthew


On Wed, Mar 9, 2011 at 08:01, Henrik Genssen wrote:

> SECRET_KEY

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



RE: Re: Multiple Servers and Authentication Sessions Breaking

2011-03-09 Thread Henrik Genssen
and do you use the same SECRET_KEY on both servers?

regards

Henrik

>reply to message:
>date: 09.03.2011 13:33:17
>from: "Tom Evans" <tevans...@googlemail.com>
>to: django-users@googlegroups.com
>subject: [] Re: Multiple Servers and 
>Authentication Sessions Breaking
>
>On Wed, Mar 9, 2011 at 8:24 AM, Matthew Roy <matt...@royhousehold.net> wrote:
>> I'm running a site with 2 front end servers (lighttpd with django in
>> fcgi daemons) and one database server (MySQL). The two front end
>> servers are in DNS round-robin so a user might get some content from
>> one and some from the other in any given session. All this works fine
>> and has had no problems for the past year it's been live.
>>
>> Now we're starting to actually use the Django authentication
>> middleware and admin interface on the production servers and it's
>> logging out users whenever their browser makes multiple requests or
>> bounces between servers. What's going wrong? Does Django not store
>> sessions in the database? Is the auth framework caching instead of
>> going back to the database server?
>>
>> Thanks for your help,
>> Matthew
>>
>
>Django stores sessions where you tell it to store sessions - what do
>you have SESSION_ENGINE set to?
>
>Cheers
>
>Tom
>
>-- 
>You received this message because you are subscribed to the Google Groups 
>"Django users" group.
>To post to this group, send email to django-users@googlegroups.com.
>To unsubscribe from this group, send email to 
>django-users+unsubscr...@googlegroups.com.
>For more options, visit this group at 
>http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Multiple Servers and Authentication Sessions Breaking

2011-03-09 Thread Tom Evans
On Wed, Mar 9, 2011 at 8:24 AM, Matthew Roy  wrote:
> I'm running a site with 2 front end servers (lighttpd with django in
> fcgi daemons) and one database server (MySQL). The two front end
> servers are in DNS round-robin so a user might get some content from
> one and some from the other in any given session. All this works fine
> and has had no problems for the past year it's been live.
>
> Now we're starting to actually use the Django authentication
> middleware and admin interface on the production servers and it's
> logging out users whenever their browser makes multiple requests or
> bounces between servers. What's going wrong? Does Django not store
> sessions in the database? Is the auth framework caching instead of
> going back to the database server?
>
> Thanks for your help,
> Matthew
>

Django stores sessions where you tell it to store sessions - what do
you have SESSION_ENGINE set to?

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.