randomly dropping sessions

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

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

Thanks for the input Muknd.

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