Magento front-end session timing out too soon
Problem
The Magento site is timing out soon while Cookie Lifetime in Magento configuration set to default 3600 seconds.
Cause
PHP’s session.gc_maxlifetime was set to be a small number so PHP cleared the session data before Magento had the chance to access it.
Solution
Set session.gc_maxlifetime in the site's php.ini to a number larger than the Cookie Lifetime.
To check Cookie Lifetime in Magento:
- Log in to Magento Admin Panel
- Navigate to System → Configuration → Web → GENERAL
- Look under Session Cookie Management for Cookie Lifetime
- Make sure it is set as intended (in seconds).