I have an application running in production mode. After a while, the session data seems to clear out. Currently I am using vanilla Rails 7.1.1.
What could be causing this? I want session data to stick around as long as possible.
>Solution :
This would set the session cookie to expire automatically 14 days after creation.
Rails.application.config.session_store :cookie_store, expire_after: 14.days
You can check the documentation