I have an application running in production mode. After awhile, the session data seems to clear out. I am using vanilla Rails 7.1.1 without any additional authentication gems.
Any idea what could be causing this? How can I investigate further? I'd like session data to stick around as long as absolutely possible for my use case.
You can set expire time of your session cookie:
Rails.application.config.session_store :cookie_store, expire_after: 14.days
https://api.rubyonrails.org/v7.1.3/classes/ActionDispatch/Session/CookieStore.html