Web sessions timeout after cron.php runs

Nextcloud version 14.0.4 and 15.0.2
Operating system and version Ubuntu 16.04.5
Apache or nginx version Apache/2.4.18
PHP version PHP 7.0.32

I have setup the background cron job, but eevry time this runs (15 mins) all the web sessions time out and every user is set back to the login page

$CONFIG = array (
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' =>
  array (

  ),
  'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '15.0.2.0',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'instanceid' => '',
  'skeletondirectory' => '/var/www/OTLskeleton',
  'remember_login_cookie_lifetime' => '0',
  'session_lifetime' => '60*60*8',
  'session_keepalive' => 'false',
  'integrity.check.disabled' => 'true',
  'upgrade.disable-web' => 'true',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'tempdirectory' => '/tmp/nextcloudtemp',
  'appstoreenabled' => false,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'loglevel' => 2,
  'maintenance' => false,
);

Thanks

'session_keepalive' => 'false',

this should just be false, like this it is considered as a string. If you put this option, when a user hasn’t had some activity over some time, the session expires (well, you session lifetime is quite long).

Regarding the cookie lifetime, check out the comment in the config file:

/**
 * Lifetime of the remember login cookie. This should be larger than the
 * session_lifetime. If it is set to 0 remember me is disabled.
 *
 * Defaults to ``60*60*24*15`` seconds (15 days)
 */

I am not sure if the cron-job just triggers this invalidating process. To be sure that there are no other errors, I’d run the cron-job manually from command line to see the outputs.

Thanks tflidd

I needed the following set

‘session_keepalive’ => ‘true’,
‘remember_login_cookie_lifetime’ => ‘60608’,

This is a boolean variable, it’s either true or false (and not 'true' or 'false' which are strings).

interesting as when imported via Json it adds the quotes?