Change SessionTimeOut in m2ee.yaml

We want to automaticaly logout users after x minutes, using SessionTimeOut custom setting. This works perfectly fine by changing the custom settings in the moddeler (via Settings > Edit Configurations > Custom: EnableKeepAlive = false SessionTimeOut = 30000 (30 seconds to test). Now I want to do this in the production environment so I changed the m2ee.yaml file: custom: # put microflow constants in here #"Module.Constant": text #"AnotherModule.AnotherConstant": bla "Integratie.UpdateABN_URL": http://localhost:8003/ws/UpdateScreeningABN/ "SessionTimeout": 30000 "EnableKeepAlive": false There is no error in PuTTY but the users don't logout after 30 seconds. Is there something wrong in the m2ee.yaml file? Kind regards, Jeroen
4 answers

How did you test this? As far as I know when you have the application open the client sends periodic a KeepAlive request to the server. As long as your browser is open the user will never be logged out.

So to test this correct you have to close your browser. The client can't send the KeepAlive requests anymore and you should be logged out after the session time out. Watch the m2ee log file to see it a has timed out.

Note that you've also placed the parameters under a wrong section. It has to go under the "mxruntime" section, not under the "custom" section


Got it!

For a sessiontimeout of 30 seconds after no activity of a user, change the following in the yaml file:


# The following options can only be set here:

SessionTimeout: 30000
EnableKeepAlive: false

Thanks for all the help! Jeroen


Don't put the key/value pairs in the 'custom' section, which holds microflow constants, like the comments say.

Put them into the 'mxruntime' section, which holds general settings that are sent to the runtime when starting.


Disclaimer: these comments are based on examining the yaml file produced by the Windows Mendix Service Console custom settings:

When I look at my yaml file which is managed by the Service Console, the use of quotes is different:

SessionTimeout: "30000"
PersistentSessions: "false"
So it might be worth testing changing your file to the above format to see if that works any better.