What does the session failover log message mean?

9
I get this message a lot, but I have no clue what it means and when it occurs. INFO - EXTERNALINTERFACE: Session failover from XASInstance: {c8959800-a068-4f43-b9da-a645d592f1b7}; number of failovers for this session is now 4
asked
1 answers
8

When you sign into a Mendix application for the first time a cookie is created containing the id of the XAS (MxRuntime) your login request was sent to. Each subsequent request will be sent to the same MxRuntime.

In the unlikely event an MxRuntime might go down a load balancer could redirect the request to another MxRuntime. This MxRuntime will check if the cookie contains its id, which it doesn't and will assume there has been a failover. It will log the message you described, increment the number of failovers in the cookie and set the new MxRuntime id.

However, in your case the situation described above is probably not what happened as load balancing is not configured by default. A more common situation in which the "session failover" message will appear is when using multiple Mendix applications in Firefox in different tabs, but in the same browser instance.

Firefox (incorrectly) kind of mixes the cookies between tabs and as each different Mendix application uses a different MxRuntime (and thus a different id), a cookie with an incorrect MxRuntime id will sometimes be sent. This results in the failover message. If you switch forth and back between Mendix application in the same browser instance this could result in quite some failover log messages.

In addition to this case, the message can also occur when a MxRuntime instance has been shutdown and a new instance has been started while your last active session is still in the database. As your session is still in the database and the cookie with your session still exists, no new cookie will be created and the MxRuntime id from this cookie will be read. As the MxRuntime id in this cookie does not correspond with the newly started MxRuntime instance the failover message will be displayed.

All in all this is not harmful, you can safely ignore these messages. If you would like to prevent these messages being logged when using multiple Mendix applications in tabs, you could start a new browser instance for each Mendix application you sign into.

answered