I have a Rails app whose sole purpose in life is to act as a webservice. The only way this app is ever used is via webservice calls. Anyway, the webservice is getting called very regularly on a cronjob. Each time it is used, it creates a ruby session file in /tmp. My /tmp partition has filled up completely on a couple of occassions, entirely by these ruby session files. Needless to say, with no scratch space many things cease functioning properly, incuding my webservice. I''ve got another cronjob setup to go through and clean out /tmp, but ideally I want to just shut off sessions completely. I have no need for them -- each webservice call is independent of the next, and I do not need any state information what-so-ever. Is there a way to do this? _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On 6.9.2005, at 22.13, Belorion wrote:> I have a Rails app whose sole purpose in life is to act as a > webservice. The only way this app is ever used is via webservice > calls. > > Anyway, the webservice is getting called very regularly on a > cronjob. Each time it is used, it creates a ruby session file in / > tmp. My /tmp partition has filled up completely on a couple of > occassions, entirely by these ruby session files. Needless to say, > with no scratch space many things cease functioning properly, > incuding my webservice. > > I''ve got another cronjob setup to go through and clean out /tmp, > but ideally I want to just shut off sessions completely. I have no > need for them -- each webservice call is independent of the next, > and I do not need any state information what-so-ever. Is there a > way to do this?Put this in one of your environment files: ::ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS = false //jarkko> _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Jarkko Laine http://jlaine.net http://odesign.fi _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
There''s a howto for this: http://wiki.rubyonrails.com/rails/show/HowtoChangeSessionOptions ----- Original Message ----- From: "Belorion" <belorion-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> Sent: Tuesday, September 06, 2005 1:13 PM Subject: [Rails] Turning OFF sessions I have a Rails app whose sole purpose in life is to act as a webservice. The only way this app is ever used is via webservice calls. Anyway, the webservice is getting called very regularly on a cronjob. Each time it is used, it creates a ruby session file in /tmp. My /tmp partition has filled up completely on a couple of occassions, entirely by these ruby session files. Needless to say, with no scratch space many things cease functioning properly, incuding my webservice. I''ve got another cronjob setup to go through and clean out /tmp, but ideally I want to just shut off sessions completely. I have no need for them -- each webservice call is independent of the next, and I do not need any state information what-so-ever. Is there a way to do this? --------------------------------------------------------------------------------> _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
with the next rails release you can even just put "session :off" in your controller ( application.rb for instance ) On 9/6/05, Belorion <belorion-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have a Rails app whose sole purpose in life is to act as a webservice. > The only way this app is ever used is via webservice calls. > > Anyway, the webservice is getting called very regularly on a cronjob. Each > time it is used, it creates a ruby session file in /tmp. My /tmp partition > has filled up completely on a couple of occassions, entirely by these ruby > session files. Needless to say, with no scratch space many things cease > functioning properly, incuding my webservice. > > I''ve got another cronjob setup to go through and clean out /tmp, but > ideally I want to just shut off sessions completely. I have no need for > them -- each webservice call is independent of the next, and I do not need > any state information what-so-ever. Is there a way to do this? > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Tobi http://jadedpixel.com - modern e-commerce software http://typo.leetsoft.com - Open source weblog engine http://blog.leetsoft.com - Technical weblog