The Dynamics AX AOS is regularly validating Client sessions in order to free sessions from inactive Clients, e. g. if the Dynamics AX Client process (ax32.exe) was terminated in Task Manager rather than closing the Client gracefully.
This Server side session validation and termination is necessary as otherwise over the time inactive Client sessions would use up the available user licenses.
The mechanism the AOS uses is quite simple.
Both on the Client (also Business Connector) and the Server (AOS) a background thread exists that is running in a loop (with a little wait interval).
The background thread on the Server is every 210 Seconds (by default) invalidating all active sessions (marking them as inactive). Within the next 210 Seconds the sessions have to be validated by the Clients again (marked as active) otherwise the sessions are considered as inactive and terminated.
Whenever the Client is talking with the Server the corresponding session is marked as active. So if the Server has marked the Client session as inactive in the meantime, it is now set as active again. If the session was active it is kept as active. The important part here is that every communication happening from the Client to the Server is marking the session on the Server as active and there is no specific function to be called.
In case the Client is idle and is not communicating with the Server, there is still the background thread on the Client that is checking every 60 Seconds (by default) if within the last 60 Seconds the Client has communicated with the Server. If this was not the case the background thread is calling a "ping" method on the Server to explicitly validate the Client session as active.
When on the AOS a session is terminated an event is logged to the Application event log of the Server:
If the Client session the Server has terminated was not inactive and later the still alive Client decides to talk with the Server again, the Server does not accept the Client any more as the session no longer exists. In that case the following event is logged in the Application event log of the Server: