I just notices my app was down, and in the log file were lots of these: No space left on device - ../config/../tmp/sessions//ruby_sess.898b1cf95e14f8e3 So i figured that i had too many sessions. I went through and deleted the sessions and then in a few minutes, the site was back up again. Can anyone explain this? Did I do the right thing? Is there a way I can tell my app to accept more sessions? clean up after Xmb? thanks! mk -- Posted via http://www.ruby-forum.com/.
A simple cron job to keep the tmp/sessions in order should do the trick. Chris On 8/16/06, Mason Kessinger <masonkessinger@gmail.com> wrote:> I just notices my app was down, and in the log file were lots of these: > > No space left on device - > ../config/../tmp/sessions//ruby_sess.898b1cf95e14f8e3 > > > So i figured that i had too many sessions. I went through and deleted > the sessions and then in a few minutes, the site was back up again. > > Can anyone explain this? > > Did I do the right thing? > > Is there a way I can tell my app to accept more sessions? clean up after > Xmb? > > thanks! > > mk > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On 8/16/06, Chris Roos <chrisjroos@gmail.com> wrote:> A simple cron job to keep the tmp/sessions in order should do the trick. > > > > > So i figured that i had too many sessions. I went through and deleted > > the sessions and then in a few minutes, the site was back up again. > > > > Can anyone explain this? > > > > Did I do the right thing? > > > > Is there a way I can tell my app to accept more sessions? clean up after > > Xmb? > >http://www.realityforge.org/articles/2006/03/01/removing-stale-rails-sessions I followed what this person did, but changed the time to 1 day instead of twenty minutes.
Mason Kessinger wrote:> Is there a way I can tell my app to accept more sessions? clean up after > Xmb?Here''s a script I wrote that you can hook right into your code: http://alevans.com/dl/session_cleanup-0.3.0.tgz You just put it into the lib directory, find a place in your code to call it where a second or two extra won''t matter, set the calling frequency and maximum session age, and it will clean up stale sessions every X hours. Optionally, it will even call back with the data from each session, in case you need to do anything with it (other cleanup, etc.). --Al Evans -- Posted via http://www.ruby-forum.com/.
Switch to ActiveRecord sessions, and eliminate this problem and get a speed boost as well. On Aug 16, 2006, at 10:02 AM, Mason Kessinger wrote:> I just notices my app was down, and in the log file were lots of > these: > > No space left on device - > ../config/../tmp/sessions//ruby_sess.898b1cf95e14f8e3 > > > So i figured that i had too many sessions. I went through and deleted > the sessions and then in a few minutes, the site was back up again. > > Can anyone explain this? > > Did I do the right thing? > > Is there a way I can tell my app to accept more sessions? clean up > after > Xmb? > > thanks! > > mk > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Tom Mornini wrote:> Switch to ActiveRecord sessions, and eliminate this problem > and get a speed boost as well.Yes! Details on changing to the ActiveRecord Store are here: http://wiki.rubyonrails.com/rails/pages/HowtoChangeSessionStore But make sure you intermittently remove THOSE stale sessions out of the database - they aren''t cleaned automatically: http://www.realityforge.org/articles/2006/03/01/removing-stale-rails-sessions -- Posted via http://www.ruby-forum.com/.