
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How do Qlik Sense (client-managed) sessions work and how to handle or terminate them
Oct 18, 2024 9:44:28 AM
Oct 18, 2024 9:44:28 AM
This article explains how client-managed Qlik Sense sessions function and how to terminate them if needed.
Qlik Sense allows a maximum of five parallel sessions per user. Beginning with the sixth authentication attempt, the connection will fail until a session becomes available. By default, the duration of a session is 30 minutes, but this can be adjusted in the Qlik Sense Enterprise Management Console (see Virtual Proxy settings).
If the maximum session count has been reached, the user will encounter the error You cannot access Qlik Sense because you have too many sessions active in parallel.
The maximum number of sessions a user can have simultaneously cannot be changed.
How does a Qlik Sense session work?
Once the user is authenticated, a cookie named X-Qlik-Session is saved in their browser. If this session cookie header’s value is not transmitted, is destroyed, or modified between the end user’s browser and the Qlik Sense server, the user's session is terminated. The user is then logged out.
By default, the session will be destroyed after 30 minutes of inactivity. Closing the browser or tab itself will not immediately terminate the session but will continue the inactivity timer.
You can verify your session timeout value or configure it:
- Open the Qlik Sense Enterprise Management Console (QMC)
- Go to Virtual Proxies
- Open the Virtual Proxy you wish to edit
- If not already expanded, open Identification
- Review or modify the Session inactivity timeout (minutes) value
How are sessions counted in Qlik Sense?
- One user opens Qlik Sense Hub with One browser on One machine = 1 session
- One user opens Qllik Sense Hub with One browser but Multiple tabs on One machine= 1 session
- One user opens Qlik Sense Hub with Two different browsers on One machine= 2 sessions
- One user opens Qlik Sense Hub with One browser, then closes the browser and reopens it = 2 sessions
- One user opens Qlik Sense Hub with One browser on Two different machines = 2 sessions
- One user opens Qlik Sense Hub and two Apps in one browser, two different tabs and on a mobile device = 2 sessions
- One user opens Qlik Sense Hub from Two virtual proxy with One browser on One machine= 2 sessions
- One user opens Qlik Sense Management Console (QMC) with One browser on One machine = 1 session
- One user opens a Qlik Sense Mashup using Two Apps hosted from the same proxy = 1 session
For more information see How to count sessions in Qlik Sense.
Most common cause for a user reaching the limit of 5 sessions in parallel
Qlik Sense admins may encounter the error message You cannot access Qlik Sense because you have too many sessions active in parallel. This often happens when they have Qlik Sense Hub open in one tab and Qlik Sense QMC in another.
The reason for reaching the maximum of five sessions is that the administrator is using the Qlik Sense service account to log into both Qlik Sense Hub and QMC. It’s important to note that the service account creates its own sessions in addition to those initiated by the user logging into the Hub or QMC.
Therefore, it is strongly recommended not to license the Qlik Sense service account for logging into the QMC, as logging into the QMC does not require a licensed user. By following this practice, you will likely avoid reaching the limit of five concurrent sessions.
For more information on the error and how to troubleshoot it, see:
- Troubleshoot no access pass or too many sessions active in parallel on Qlik Sense hub
- Qlik Sense Service account: "You cannot access Qlik Sense because you have no access pass"
- You cannot access Qlik Sense because you have no access pass - intermittent problem
- Certain users get "too many sessions active in parallel"
How to delete sessions
If you do not want to wait for Qlik Sense to automatically delete a session after 30 minutes of inactivity, you have the option to manually terminate it the session and reconnect to Qlik Sense.
There are various methods for deleting sessions in Qlik Sense, each with its advantages and disadvantages. Below are a few examples:
Delete the sessions by restarting the Qlik Sense Proxy Service
To do this:
- Open the Qlik Sense Enterprise Management Console (QMC)
- Go to Virtual Proxies
- Open the Virtual Proxy you wish to edit
- Modify the Session inactivity timeout (minutes) value
- Click Apply
This prompts a restart of the proxy.
The advantage of this method is that you can perform it directly in the QMC without needing any third-party scripts or tools. However, the downside is that restarting the proxy service will delete sessions for all users.
Use the Qlik Sense API
The first step is to retrieve all user sessions from the available proxies and then delete them one by one. The advantage of this method is that you can delete individual user sessions without affecting the sessions of other users. However, the downside is that it requires technical knowledge to write the program that will list the user’s sessions and allow you to choose which sessions to delete.
Using an external tool like qlik-cli-utils
Qlik-cli-utils (GitHub) is a collection of PowerShell scripts that enables you to automate certain tasks. With qlik-cli-utils, you can delete an individual user’s sessions without affecting the sessions of other users.
The advantage of this tool is that you can specify which user’s sessions you want to delete. However, the downside is that it operates via a command line without a graphical user interface (GUI), and you need to install Qlik-CLI (a PowerShell module obtained from GitHub) in addition to qlik-cli-utils. Deleting sessions is done one at a time, as shown in the image below.
Related Content
Qlik Fix: How to fix "Too many sessions active in parallel"
Troubleshoot no access pass or too many sessions active in parallel on Qlik Sense hub