How to fix ActionDispatch::Cookies::CookieOverflow error on heroku? How to fix ActionDispatch::Cookies::CookieOverflow error on heroku? heroku heroku

How to fix ActionDispatch::Cookies::CookieOverflow error on heroku?


Rails cookies are limited to 4KB. Note that the session is stored in the cookie in the default configuration too. See: http://guides.rubyonrails.org/security.html#session-storage

The only thing you can do about that: Do not store big objects in the cookie. Store them in the database and then only store the object's id in the cookie.

This answer might also be interesting to you: https://stackoverflow.com/a/4604212/2483313