My rails (1.1.6) wep application has been working fine for months, with
15 000 user per day. never had any problem with session.
Then I added a new feature to my app, and, after 4 to 6 hours, sessions
start to be lost.
I mean, i set a session["a"] = stuff, at the next call,
session["a"]
will be nil !!!
So my user can not login...because of the session["user_id"]
If i restart my application, it works fine for an extra 4 to 6 hour.
If i rollback my application to before the new feature, it works fine.
here is my new feature:
begin
        timeout(15) do
    puts system( EXECUTE AN OPENOFFICE MACRO )
  end
rescue Timeout::Error => err
  log
rescue Exception => err
  log
end
So the new feature is to upload user file, and handle then with an
openoffice macro with a system command...
Sometime, the command fail...
Could it be possible that this command have some impact on the rails
session managment system ?
My session are stored in a Mysql DB.
Please help, any clue are welcome
-- 
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
-~----------~----~----~----~------~----~------~--~---
or, is there any way to debug session management in rails ? -- 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 -~----------~----~----~----~------~----~------~--~---
On 21 Feb 2008, at 23:32, Hakita Hakita wrote:> > > My rails (1.1.6) wep application has been working fine for months, > with > 15 000 user per day. never had any problem with session. > > Then I added a new feature to my app, and, after 4 to 6 hours, > sessions > start to be lost. > I mean, i set a session["a"] = stuff, at the next call, session["a"] > will be nil !!! > So my user can not login...because of the session["user_id"] > > If i restart my application, it works fine for an extra 4 to 6 hour. > > If i rollback my application to before the new feature, it works fine. > > here is my new feature: > > begin > timeout(15) do > puts system( EXECUTE AN OPENOFFICE MACRO ) > end > rescue Timeout::Error => err > log > rescue Exception => err > log > endYou may be running into the problem I wrote about here: http://www.texperts.com/2007/05/01/race-conditions-in-rails-sessions-and-how-to-fix-them/ Short version: because you''ve got such a long running action, it is very likely that you''ll get concurrent requests from the same user and the different updates to the session overwrite each other. Fred> > > > So the new feature is to upload user file, and handle then with an > openoffice macro with a system command... > > Sometime, the command fail... > > Could it be possible that this command have some impact on the rails > session managment system ? > > My session are stored in a Mysql DB. > > > Please help, any clue are welcome > -- > 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 -~----------~----~----~----~------~----~------~--~---