Session behavior can be configured in php.ini.
php.ini
Important settings include:
Example configuration:
session.gc_maxlifetime = 1440;