Try the fastest and simplest way to install ONLYOFFICE

[Document Server] Set an idle session timeout

Tech support for Enterprise Version

[Document Server] Set an idle session timeout

Postby dsi-lille » Thu Mar 02, 2017 12:50 pm

Hi,

i try to set an idle session timeout on our document server.

So, i set "sessionidle" param from default.json file.
But it's doesn't work, the session are still active even after the session idle time.

all i have is this log message :

Code: Select all
[2017-03-02 10:32:00.771] [INFO] nodeJS - data.type = extendSession id = HMbOYTWshVV_yk9XuCQ_


after some investigation, i found something strange in the Document Server sdkjs :

in the apiBase.js line 597 (https://github.com/ONLYOFFICE/sdkjs/blo ... se.js#L597), i don't understand the code below especially how the idletime is calculated.

Code: Select all
         if (c_oCloseCode.sessionIdle == code) {
            var lastTime = new Date().getTime();
            var idleTime = new Date().getTime() - lastTime;
            if (idleTime < interval) {
               t.CoAuthoringApi.extendSession(idleTime);
            } else {
               extendSession = false;
            }


For me, idletime will always have the value 0, so the session will never end. Am i right ?

Thanks for your help,
Yoann
dsi-lille
 
Posts: 111
Joined: Mon Jul 11, 2016 1:47 pm

Re: [Document Server] Set an idle session timeout

Postby Maxim » Thu Mar 02, 2017 1:29 pm

Hello Yoann!
Yes, you're right! Session will be closed as you close the browser. We plan to reduce session time to 5 min. in 9 release.
Maxim
 
Posts: 1075
Joined: Tue Oct 11, 2016 2:34 pm

Re: [Document Server] Set an idle session timeout

Postby dsi-lille » Thu Mar 02, 2017 2:35 pm

Hello Maxim,

thanks for your answer, but this code came from the Document Server not from the Community Server.
All the work for limiting session is already done (just set "sessionidle" param in default.json), i just pointed out what is, for me, a bug : idleTime variable is not correctly calculated.

This "bug" could be rapidly fixed ?

Thanks a lot,
Yoann
dsi-lille
 
Posts: 111
Joined: Mon Jul 11, 2016 1:47 pm

Re: [Document Server] Set an idle session timeout

Postby Maxim » Thu Mar 02, 2017 3:07 pm

Yoann, there is a bug indeed. We cannot fix it rapidly unfortunately, next releases we will fix it.
Maxim
 
Posts: 1075
Joined: Tue Oct 11, 2016 2:34 pm


Return to Enterprise Version

Who is online

Users browsing this forum: No registered users and 1 guest