Forum: Ruby on Rails randomly dropping sessions

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ab0b702e7fcc79bb7d2c6c67f64e1b4d?d=identicon&s=25 Tim (Guest)
on 2009-01-06 23:37
(Received via mailing list)
Hey all,

Most of our customers get through our shopping cart no problem so
orders continue to flow.  However we've recently (past 10 days)
started receiving reports of people not being able to add items to
their cart.  This seems to be affecting 2-3% of our customers.  Taking
a look at the logs I can see the sessions getting completely lost just
as if the client had cookies disabled.  I see no other warnings or
errors.

We did have nearly 350k sessions accumulated in our sessions table
which I cleared out to around 40k last night.  We haven't got any
reports since then but I can't say yet if it's helped.  I'm sure their
have been other times when our sessions table got that large without
this problem.  We have >>very<< beefy hardware for our needs so I
would expect to be able to handle that number of sessions without
trouble.

The site has been up for going on 3 years with no significant issues
and has had no code changes other than some minor template/html tweaks
in a couple months.

ubuntu 8.10
rails 2.1.0 && active_record_store
mysql 5.0.51

Any thoughts greatly appreciated.  Thanks in advance!
Tim
29ebf90af6107d2eb39b587c7972639c?d=identicon&s=25 Mukund (Guest)
on 2009-01-08 10:50
(Received via mailing list)
Personally,  I would add in the logic to clean up old sessions
periodically or during login.    Also, is there a reason you are not
using  Rails 2.1.2 or even better 2.2.2?  Staying updated with Rails
versions usually resolves any odd defect that you see.

Thanks,
Mukund
Ab0b702e7fcc79bb7d2c6c67f64e1b4d?d=identicon&s=25 Tim (Guest)
on 2009-01-08 19:02
(Received via mailing list)
Thanks for the input Muknd.

On Jan 8, 1:50 am, Mukund <marut...@yahoo.com> wrote:
> Personally,  I would add in the logic to clean up old sessions
> periodically or during login.    

Yeah, when I said that I cleared them out I actually setup a cron job
to do it regularly.

> Also, is there a reason you are not
> using  Rails 2.1.2 or even better 2.2.2?  Staying updated with Rails
> versions usually resolves any odd defect that you see.

I may soon but I suspect that's not really the issue here.  I
typically don't like to
upgrade just for the sake of upgrading.

Thanks again!
Tim
This topic is locked and can not be replied to.