Deal with Qlik Sense Sessions

%Qlik Sense Reporting Tool & Alternative to NPrinting%Qalyptus

Download PDF

 

You have probably encountered this error in Qlik Sense “You cannot access Qlik Sense because you have too many sessions active in parallel“. If not, you will probably meet her one day 😉.
Qlik Sense allows a maximum of 5 parallel sessions per user. From the sixth authentication attempt, the connection will fail until a session becomes free. The duration of a session is 30 minutes by default. This duration can be modified in the QMC in the virtual proxy settings.

Be aware that there is no way at this time to change the maximum number of sessions that a user can have simultaneously.

How the sessions work?

Once the user is authenticated, a cookie is saved on his browser with the name X-Qlik-Session. If, between the end-user’s browser and the Qlik Sense server, the value of the session cookie header is not transmitted, destroyed or modified, the user session is terminated and the user is logged out.
By default, the session will be destroyed after 30 minutes of inactivity. When you close your browser, the session is not destroyed immediately 🙃. See how the sessions are counted below.

%Qlik Sense Reporting Tool & Alternative to NPrinting%Qalyptus

How are sessions counted in Qlik Sense?

One session is counted for a user when using Qlik Sense Hub and Qlik Sense QMC, … yes even when you connect to the QMC Qlik Sense records a session 😁.
Here are examples to illustrate how sessions are counted depending on your use of Qlik Sense:

  • You open Qlik Sense Hub with a browser on one machine = 1 session
  • You open Qlik Sense Hub with a browser but several tabs on a machine = 1 session
  • You open Qlik Sense Hub with two different browsers on one machine = 2 sessions
  • You open Qlik Sense Hub with a browser on a machine after completely closing the same browser (not the tab) that has already opened Qlik Sense Hub = 2 sessions
  • You open Qlik Sense Hub with a browser on two different machines = 2 sessions
  • You open Qlik Sense Hub in a browser and on a mobile device = 2 sessions
  • You open Qlik Sense Hub from two virtual proxies with a browser on one machine = 2 sessions
  • You open Qlik Sense Management Console (QMC) with a browser on a machine = 1 session
  • You open Qlik Sense Hub and Qlik Sense Management Console (QMC) with browser on one machine = 2 sessions

The first reason a user reaches the limit of 5 sessions in parallel

Many Qlik Sense admins are surprised when they receive the error message “You cannot access Qlik Sense because you have too many sessions active in parallel“. They usually opened Qlik Sense Hub in one tab and Qlik Sense QMC in another tab.
In this case, the reason the maximum number of 5 sessions is reached is because the administrator uses the Qlik Sense service account to log in to Qlik Sense Hub and QMC. Note that the service account can creates sessions in addition to sessions created by the user by logging into the Hub or QMC.
Therefore, it is strongly recommended that you do not license the Qlik Sense service account and use it to log into to the QMC. Logging in to QMC does not require a licensed user.
By doing this, you will probably never reach the limit of 5 concurrent sessions.

Delete sessions

If you don’t want to wait for Qlik Sense to automatically delete sessions (after 30 minutes of inactivity), you have the option to delete sessions so that you can reconnect to Qlik Sense.
There are different ways to delete sessions in Qlik Sense with each method having advantages and disadvantages.
I have chosen to present three methods to you:

1- Delete the sessions by restarting the Qlik Sense Proxy Service. To do this, all you have to do is go to QMC> Virtual proxy then modify for example “Session inactivity timeout” then click Applay. The advantage of this method is that you can do it directly in the QMC without needing to use a third-party script or tool. The downside of this method is that restarting the proxy service will delete sessions for all users 🥺.

%Qlik Sense Reporting Tool & Alternative to NPrinting%Qalyptus
2- Use the Qlik Sense API. The first step would be to retrieve all user sessions from all 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. The downside of this method is that it requires technical knowledge to write the program that will list the user’s sessions and choose which sessions to delete.

3- Using an external tool like qlik-cli-utils. Qlik-cli-utils is a collection of PowerShell scripts that allows you to automate certain tasks. With qlik-cli-utils, you can delete one user’s sessions without affecting the sessions of other users. Advantage of this tool, you can choose the user for whom you want to delete sessions. disadvantages, this is a tool with command lines without a GUI, and you would have to install Qlik-CLI (a PowerShell module) in addition to qlik-cli-utils. Deleting sessions is done session by session, as shown in the image below.

%Qlik Sense Reporting Tool & Alternative to NPrinting%Qalyptus

 

Here’s for sessions in Qlik Sense Enterprise. If you have any questions or if something is not clear to you, do not hesitate to write to me on LinkedIn.

 

%Qlik Sense Reporting Tool & Alternative to NPrinting%Qalyptus

Consider sharing this article!

 

keyboard_arrow_up