I want to increase the session time for users/admins to infinite or until they log out themselves. I do not want the users to log out automatically after 2 hours.
I know there are some changes required in config.pho file, can someone please drop me a line of code that I have to put there?
Please drop me a full line of code that I can replace with 2 hours of session time, I need an infinite login session for customers and admin panel. I never want them to log out until they log out themselves.
It's effectively an idle time and is used for security purposes. I.e. if you're away from your desk for more than 2 hrs, then the session becomes inactive until you re-login.
2hrs seems a reasonable amount of time to expect interaction with your site before effectively logging you out.
SESSIONS_STORAGE_ALIVE_TIME only affects data (like products in cart) and how long they are retained. It will NOT affect how long a user can be idle during their login.
I'd suggest you be more pragmatic in how long you allow a user's session to remain active while idle. There are several security concerns as well as general usage patterns. Right now its 2 hrs. You might consider upping it to 24. But not sure I'd go beyond this give the amount of session data that is stored per logged in user. Setting it to 1 year effectively says "never see data as stale" which which is unrealistic.
Otherwise, beef up your database server to a SAN and implement a caching server to cache recently accessed data. I.e. put your DB on a separate server designed for dealing with large database tables and caching.
i have changed SESSIONS_STORAGE_ALIVE_TIME to 2 weeks, and it has been working fine for the last 1 year. database size has increased, but my server can handle it.
Now the problem which i am facing is that "SESSIONS_STORAGE_ALIVE_TIME" has also inreased the login session timing of admins. which is a problem. can anyone guide me to make changes to code, so that "SESSIONS_STORAGE_ALIVE_TIME" for frontend users can be 2 weeks and for backend admins can be 2 hours only.