I''m using Mongrel 1.0.1 and Apache 2.0 to serve up a handulf of Rails applications. Apache proxies requests to the instances of Mongrel and uses ProxyPass and ProxyPassReverse to deliver static files. The Rails application uses sessions, and this appears to be where the issue is occurring. If too many users login to the application, then at some point the application stops responding to the login process. People will still receive the application''s login screen and be able to submit the form data, but instead of logging them in the application will just load up the login screen again. This happens indefinitely. In order to resolve the situation, I need to restart the Mongrel instance. After restarting the Mongrel instance, the application works fine for a while. This only happens with this one application that is using Rails sessions. What could be causing this problem? And how can I resolve it? Any suggestions/ideas are very welcome. Thanks, Nathan -- Nathan Mealey Systems Librarian Boston, MA 617.521.2755 nathan.mealey at simmons.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070801/dd789f88/attachment.html
On 8/1/07, Nathan Mealey <nathan.mealey at simmons.edu> wrote:> > I''m using Mongrel 1.0.1 and Apache 2.0 to serve up a handulf of Rails > applications. > > Apache proxies requests to the instances of Mongrel and uses ProxyPass and > ProxyPassReverse to deliver static files. > > The Rails application uses sessions, and this appears to be where the issue > is occurring. >Will be very helpful to know: 1) Version of Rails. 2) What kind of session storage are you using? (PStore, ActiveRecord, Cookie) 3) What are you storing in the session? (the user_id or the full user object) -- the later is bad practice, but often seen used in many applications. -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi
Thanks for the response. Rails version: 1.8.6 Session storage: PStore Storing only the user_id in the session object. Thanks, Nathan -- Nathan Mealey Systems Librarian Boston, MA 617.521.2755 nathan.mealey at simmons.edu On Aug 2, 2007, at 1:30 AM, Luis Lavena wrote:> On 8/1/07, Nathan Mealey <nathan.mealey at simmons.edu> wrote: >> >> I''m using Mongrel 1.0.1 and Apache 2.0 to serve up a handulf of Rails >> applications. >> >> Apache proxies requests to the instances of Mongrel and uses >> ProxyPass and >> ProxyPassReverse to deliver static files. >> >> The Rails application uses sessions, and this appears to be where >> the issue >> is occurring. >> > > Will be very helpful to know: > > 1) Version of Rails. > > 2) What kind of session storage are you using? (PStore, > ActiveRecord, Cookie) > > 3) What are you storing in the session? (the user_id or the full user > object) -- the later is bad practice, but often seen used in many > applications. > > -- > Luis Lavena > Multimedia systems > - > Leaders are made, they are not born. They are made by hard effort, > which is the price which all of us must pay to achieve any goal that > is worthwhile. > Vince Lombardi > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070802/4c4dc218/attachment.html
On 8/2/07, Nathan Mealey <nathan.mealey at simmons.edu> wrote:> Thanks for the response. > > Rails version: 1.8.6Guess thats Ruby, not Rails.> > Session storage: PStore > > Storing only the user_id in the session object. >PStore is good for development or testing locally, and not for a good traffic site, since each session will create a new file... and Windows don''t behave great with thousands of files in the same folder (check tmp/sessions folder). I''ll suggest you call about script inside your rails app to get some info like this: About your application''s environment Ruby version 1.8.5 (i386-mswin32) RubyGems version 0.9.4 Rails version 1.2.3 Active Record version 1.15.3 Action Pack version 1.13.3 Action Web Service version 1.2.3 Action Mailer version 1.3.3 Active Support version 1.4.2 Edge Rails revision ... Application root ... Environment development Database adapter mysql Database schema version 148 -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi