开发者

Rails CookieStore::CookieOverflow, not for all users, only in production

I have a couple users that are getting this CookieStore::CookieOverflow error.

I'm suspicious of nginx/passenger because I just switched to that last week (from nginx/thin) and now these are happening.

It's always a particula开发者_StackOverflow社区r action, but it doesn't happen for all users. I checked to see what I'm storing in the session and I'm not saving any large objects, just a couple ids and a couple boolean values.

If I were storing big objects in the session, I'd expect all users to have this error.

Suggestions on how to troubleshoot this would be helpful.


Tracking and debugging a CookieStore::CookieOverflow error it's not simple. You should try to replicate exactly the same user activity on the site.

A couple of suggestions to fix the error: * switch to a more scalable cookie storage such as ActiveRecord or Memcached * try to reduce the number of elements stored in session

Also note that flash messages are stored in session. If you send back a really long flash message text you might expect a CookieOverflow error.


Three Date objects stored in the session were causing this. Removing them from the session stopped the error from happening.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜