Session expiry doesn't correspond with config.json settings

Hi there, I have users complaining about expiring sessions. The notification below says sessions expire after 6 days and 2 hours, a total of 146 hours, but when I check my config.json I can’t find any setting which corresponds with this value? Searching for “146” doesn’t find a potentially differently labeled setting either.

Config.json:

"SessionLengthWebInDays": 180,
        "SessionLengthWebInHours": 4320,
        "SessionLengthMobileInDays": 180,
        "SessionLengthMobileInHours": 4320,
        "SessionLengthSSOInDays": 30,
        "SessionLengthSSOInHours": 720,
        "SessionCacheInMinutes": 10,
        "SessionIdleTimeoutInMinutes": 43200,

Also checked my docker-compose.yml and there is no setting which could potentially overrule what’s in config.json.

Anyone got an idea what might be going on?

Mattermost Version: 9.9 (now on 9.10.1)
Database Schema Version: 124
Build Number: 9991409237
Database: postgres

You could debug a little further to see if mattermost even “reads” that configuration correctly.

This should give you the current configuration from mattermost if i remember correctly:

docker exec -it mattermost mmctl —local config get ServiceSettings.SessionLengthWebInDays

More about the command:
https://docs.mattermost.com/manage/mmctl-command-line-tool.html#mmctl-config-get

Good one!

$ sudo docker exec mattermost-app mmctl --local config get ServiceSettings.SessionLengthWebInDays
180

180 is what I specified in SessionLengthWebInDays. So it’s reading the config correctly.
Looks like this may be a client issue?

Nice!
It could be yea. Does the user access via webbrowser or desktop client?
Is the setting “ Extend session length with activity” enabled?

(See more in Extend session length with activity - Mattermost documentation)
Im not entirely sure where the issue should be tbh… just try to help to find it :sweat_smile:

I think this is an error message from the mobile client, but need to double check to be sure.

If it is the mobile client than you need to check the settings for that.
Like ServiceSettings. SessionLengthMobileInHours and the others from the link I send in my previous reply

Client is confirmed to be Android, and hence you are right, it’s the mobile settings which should be at play. I remember I increased the mobile numbers a while back, and from my config.json in my initial post you can see that they are a lot higher than what’s show in the user screenshot.

I did try the occ command you pointed out earlier with the two “SessionLengthMobile…” and they do match what I configured.

 sudo docker exec mattermost-app mmctl --local config get ServiceSettings.SessionLengthMobileInDays
180
$ sudo docker exec mattermost-app mmctl --local config get ServiceSettings.SessionLengthMobileInHours
4320