From QIX engine memory management and CPU utilization
In QlikView, a session ends a configurable amount of time after the user closes the browser tab where the session is running (that is, at "All sessions timed out"). In Qlik Sense, which uses WebSocket, the session ends when the user closes the browser tab (that is, at "User activity ends").
In practice, this means that when a browser refresh occurs in Qlik Sense, the user will create a new session. When inspecting the frames of the websocket traffic to the Engine, an administrator will see SESSION_CREATED
signaling that the Engine is creating a new session. Like so:
(screenshot from Chrome's Developer Tools which allows inspection of the frames of websocket connections)
There are scenarios where an administrator would prefer to keep sessions open for extended periods of time due to the response time of the Engine when creating a new session versus using an existing session and this article will outline how to accomplish this. This approach requires adjusting the time to life (TTL) settings for the Qlik Sense Engine.
This functionality is only
present in Qlik Sense Enterprise November 2017 or higher.
- Qlik Sense November 2017
- Qlik Sense February 2018
- Qlik Sense April 2018
Setting (1) enabled TTL in the Engine and Setting (2) defines the period of time the Engine will preserve the session after the websocket connection is closed.
An example Settings.ini file with TTL enabled for 30 seconds is:[Settings 7]EnableTTL=1SessionTTL=30
When inspecting Chrome's Dev Tools on a browser refresh, we see this response:Concerns:
- The key may change slightly between builds
- For example SessionTTL becomes TTLSeconds
- Monitor RAM usage since this will increase the session cache of the Engine process, albeit marginally