EnableKeepAlive not working

0
We are running 3 on premise servers with load balancing. I have added EnableKeepAlive: true in yaml files under mxruntime, but users are still complaining they are being logged out. Is there something else I need to do to so that users remain logged in? Thanks, Tracy
asked
1 answers
1

Keep Alive is enabled by default, and any Mendix application will send a keep alive message from the browser to the server every two minutes. Additionally every user click/query will also act as a keepalive. So as long as users are working in the application (retrieving data or triggering microflows) the session will not expire.

This leads me to believe that there are other issues in your setup. Can you give some more info on your infra structure, what do you have setup? You refer to multiple servers behind a loadbalancer, things you'll need to run the platform successfully with a high-availability setup:
- Enabling and configure clustering.     Did you enable and configuring clustering?
- Redis session storage.    How have you configured your Redis server?
- Load balancer configuration.    What kind of load balancing method are you using?
- Application configuration should match all nodes.   Did you confirm the yaml config on all servers is identically?
- Shared file storage, also needs to be configured but is irrelevant to your problem.

I'm thinking that there is a problem in sharing the session state, if the load balancer, after login, switches your user to a different node it might not be able to find the session state. If there is no session state the user isn't logged in and the session in the browser will be destroyed.

See also: https://world.mendix.com/display/refguide6/Clustered+Mendix+Business+Server

answered