Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Uploads getting stuck in the virus scanner. We are investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

Qliksense inactivity session timeout

Hi,

can anyone tell me how to set session limit timeout in qmc?

I need to set limit to 10 minutes.

Thanks a lot

Fra

13 Replies
Highlighted
Contributor II
Contributor II

Yes, you can say me the max value of this parameter "keep alive timeout (seconds)"  contained in the Virtual Proxies section?

Highlighted
Specialist III
Specialist III

Hi Maria,

I think by default time is 30 minutes so you can trying like 60 min , I believe unit it uses in minutes. You may try once and let me know too.

Highlighted
Contributor III
Contributor III

this is indeed a bit annoying and the answers here did not help,

we're using the mashup option and it keeps disconnecting after 60 seconds of inactivity (not selecting anything in the model),

this is what we get:

"

An error occurred

Connection lost. Make sure that Qlik Sense is running properly. If your session has timed out due to inactivity, refresh to continue working.

"

luckily everything has a work around and a good one (:

so the deal is that as long as you provoke the web socket the connection will stay open, so just provoke it,

this is how its done:

create a variable in your model (Data Load Editor or in the bottom left of the sheet after pressing edit),

now create a KPI and put the variable in the kpi

last thing, put the qlik object on the top page and create a set interval

var qlikapp = null;

require( ["js/qlik"], function ( qlik ) {

qlik.setOnError( function ( error ) {

  $( '#popupText' ).append( error.message + "<br>" );

  $( '#popup' ).fadeIn( 1000 );

} );

$( "#closePopup" ).click( function () {

  $( '#popup' ).hide();

} );

//callbacks -- inserted here --

//open apps -- inserted here --

qlikapp = qlik.openApp('4287ca1c-9b53-45dc-afe2-55f8e69af7f2', config);

//get objects -- inserted here --

qlikapp.getObject('QV01','fkAQBG');

qlikapp.getObject('CurrentSelections','CurrentSelections');

//create cubes and lists -- inserted here --

} );

setInterval('KeepSessionAlive()', 5000);

function KeepSessionAlive() {

if (qlikapp) {

  //alert(getTime());

  qlikapp.variable.setStringValue('Current Time', getTime());

}

return false;

}

but do you really want to keep the socket open all the time?

this is an optimization question, if all the users use a named license then sure! but what if you convert some of them to Login Access Tokens? (you get 10 hours per month for each license)

this could be a waste of license time, so show some creativity, to my opinion 5 minuets of inactivity counted from the last mouse move on the page for login access user, and unlimited keep alive (until the window is closed for User access) is the best way to go.

this is a basic code for mouse move (i used it in qlikview i frame to keep the login alive):

var keepSessionAliveBool = false;

SetupSessionUpdater();

function SetupSessionUpdater() {

//...set the event that makes the keep alive

var container = $("#QvBody");

container.mousemove(function() {

  keepSessionAliveBool = true;

});

container.keydown(function() {

  keepSessionAliveBool = true;

});

CheckToKeepSessionAlive();

return true;

}

function CheckToKeepSessionAlive() {

setTimeout("KeepSessionAlive()", 30000); // // 1000 is every second

return true;

}

function KeepSessionAlive() {

CheckToKeepSessionAlive();

if (keepSessionAliveBool) {

  window.parent.postMessage("KeepSessionAlive", "*");

  keepSessionAliveBool = false;

  return true;

}

return false;

}

Highlighted
Contributor III
Contributor III

the root cause for this issue might also be load balancer (we use aws) and not qlik sense,

see:

Elastic Load Balancing Connection Timeout Management | AWS News Blog

console_elb_conn_settings_2.png