What session store are you using? On Tue, Jul 29, 2008 at 12:25 PM, jamie <jamie.alexander-bJEeYj9oJeDQT0dZR+AlfA@public.gmane.org> wrote:> > Looking for insight on a strange problem that I cannot reproduce, but > some of my users are experiencing. Every request sent to the browser > is assigned a different session id, consequently they cannot log in. > The problem seem to only appear for certain Firefox users. They do > have their cookies turned on. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I wish I could provide a more helpful answer but the reality is I am not exactly sure... I do know that session are stored in /tmp/sessions I just realized that this problem started occurring when I moved from a single process to a mongrel_cluster balanced by pound. On Jul 29, 1:34 pm, "Brian Hogan" <bpho...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> What session store are you using? > > On Tue, Jul 29, 2008 at 12:25 PM, jamie <jamie.alexan...-bJEeYj9oJeDQT0dZR+AlfA@public.gmane.org> wrote: > > > Looking for insight on a strange problem that I cannot reproduce, but > > some of my users are experiencing. Every request sent to the browser > > is assigned a different session id, consequently they cannot log in. > > The problem seem to only appear for certain Firefox users. They do > > have their cookies turned on.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Jamie,> I wish I could provide a more helpful answer but the reality is I am > not exactly sure... I do know that session are stored in /tmp/sessions > > I just realized that this problem started occurring when I moved from > a single process to a mongrel_cluster balanced by pound.File-based session stores don''t work well with application clusters. If on Rails 2.0 or earlier, use the ActiveRecord session store. You can enable it in environment.rb and create the required database table using rake db:session:create and a subsequent db:migrate. If on Rails 2.1, use the cookie-based session store. This is the default unless you have specified otherwise in environment.rb. -- Roderick van Domburg http://www.nedforce.nl -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Also made sure your users know that the must accept cookies from your site. If you do happen to be using the Rails 2.1 default cookie session store, and your clients have cookies disabled, I''m not sure what affect that would have on Rails, but it may very well create a new session for every request. Since you mentioned that only some of your users are experiencing this problem then maybe that''s what''s happening. P.S. Even if you are using ActiveRecord session store, I believe that your users must still accept your cookies otherwise Rails would not have access to their session id in order for to keep track them. On Jul 29, 4:51 pm, Roderick van Domburg <rails-mailing-l...@andreas- s.net> wrote:> Hi Jamie, > > > I wish I could provide a more helpful answer but the reality is I am > > not exactly sure... I do know that session are stored in /tmp/sessions > > > I just realized that this problem started occurring when I moved from > > a single process to a mongrel_cluster balanced by pound. > > File-based session stores don''t work well with application clusters. > > If on Rails 2.0 or earlier, use the ActiveRecord session store. You can > enable it in environment.rb and create the required database table using > rake db:session:create and a subsequent db:migrate. > > If on Rails 2.1, use the cookie-based session store. This is the default > unless you have specified otherwise in environment.rb. > > -- > Roderick van Domburghttp://www.nedforce.nl > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks for the suggestions... one final related curiosity.. if the session ID keeps changing for each request, will it make a difference whether the session store is file based, cookie based or active record based. Does not the session ID identify the session? On Jul 29, 6:53 pm, Robert Walker <r0b3rt4...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Also made sure your users know that the must accept cookies from your > site. If you do happen to be using the Rails 2.1 default cookiesessionstore, and your clients have cookies disabled, I''m not sure > what affect that would have on Rails, but it may very well create a > newsessionfor every request. > > Since you mentioned that only some of your users are experiencing this > problem then maybe that''s what''s happening. > > P.S. Even if you are using ActiveRecordsessionstore, I believe that > your users must still accept your cookies otherwise Rails would not > have access to theirsessionidin order for to keep track them. > > On Jul 29, 4:51 pm, Roderick van Domburg <rails-mailing-l...@andreas- > > s.net> wrote: > > Hi Jamie, > > > > I wish I could provide a more helpful answer but the reality is I am > > > not exactly sure... I do know thatsessionare stored in /tmp/sessions > > > > I just realized that this problem started occurring when I moved from > > > a single process to a mongrel_cluster balanced by pound. > > > File-basedsessionstores don''t work well with application clusters. > > > If on Rails 2.0 or earlier, use the ActiveRecordsessionstore. You can > > enable it in environment.rb and create the required database table using > > rake db:session:create and a subsequent db:migrate. > > > If on Rails 2.1, use the cookie-basedsessionstore. This is the default > > unless you have specified otherwise in environment.rb. > > > -- > > Roderick van Domburghttp://www.nedforce.nl > > > -- > > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---