I got it sorted by increasing the session.gc_maxlifetime variable in php.ini. (Note that there may be more than one such file, as the main config file can be overridden by an application's own php.ini. And if you have the PHP CLI package installed, it also has its own php.ini. On a local server, with no other PHP applications, you can safely apply the change to all of them.)