Auto logout not logging out after specified time

Nextcloud version (eg, 20.0.5): 25.0.1
Operating system and version (eg, Ubuntu 20.04): 20.04.5
Apache or nginx version (eg, Apache 2.4.25): 2.4.41
PHP version (eg, 7.4): 7.4

I set up nextcloud to automatically log out of the web session after 2 hours. The automatic log out does work, however it’s logging out earlier than the specified time, after around 30 minutes instead of the specified 2 hours.

The output of your config.php file in /path/to/nextcloud:

  'remember_login_cookie_lifetime' => 7200,
  'session_lifetime' => 60 * 60 * 2,
  'session_keepalive' => false,
  'auto_logout' => true,

The admin audit logs do not show anything specific about this other than a “Logout occurred” entry for the moment of the logout

Also, an additional question related to logging out: is it possible to set up an automatic log out for the desktop client? Thank you.