What is the maximum session life time for the frontend customers in magento2?
Also, Is the session lifetime depends on session.gc_maxlifetime php variable?
Any help please?
The lifetime of a customer shopping session is determined by several factors, including the length of the server session, the use of a persistent cart, and the lifetime of information that is stored in the browser. Although these are related to the same customer experience, they are actually separate processes with different expiration events and lifetimes.
To configure the cookie lifetime:
On the Admin sidebar, go to Stores > Settings > Configuration.
If you have multiple stores, set the Store View chooser in the upper-right corner to the store where the configuration applies.
In the panel on the left under General, choose Web.
Expand the Default Cookie Settings section.
To change the default, clear the Use system value checkbox and enter the new value in seconds.
Click Save Config.
After setting your cookie lifetime in the admin to for example 1200 (in seconds, remember), check your php.ini settings to make sure session.gc_maxlifetime is set to something on the high end of what you may want to set in Magento (or on other applications on the same server).
86400 (one day) is a reasonable setting.