Skip to main content
Dani Szwarc
Inspiring
March 21, 2019
Question

Session timeout when multiple windows are open

  • March 21, 2019
  • 2 replies
  • 3047 views

Hello community, in the company I work for we had a problem with the server and needed to be formatted and CF11 was reinstalled.

One of the things that users were able to do was to have multiple tabs open running the application, same session.

So let's say I had Tab 1 working on something and then opening a link from Tab 1 into a new tab.

Now, after the reinstall, if I am working in Tab 1 for more than 20 minutes (session timeout settings) and don't do anything in Tab 2, the session will timeout and I will have to sign back in.

Is there anything in the CF11 admin that I need to modify in order to keep the session alive when I am working with 1 tab for more than 20 minutes while other tabs from the same application are open?

Thank you in advance!

This topic has been closed for replies.

2 replies

BKBK
Community Expert
Community Expert
March 26, 2019

My guess is that the session is not timing out. What you've said so far suggests the code isn't properly maintaining the session between requests. Instead, one of the requests creates new session for the user before the current one times out.

Could you share the code that sets the session. Include the code connecting session with login. If your code contains sensitive information, send it by private message.

Dani Szwarc
Inspiring
March 26, 2019

Hey BKBK, thank you very much for your help.

I will get that info to you.

The more I work with this issue the more I learn: this is happening only to a couple of users and I still haven't been able to reproduce it myself, which makes it more complicated to troubleshoot.

The way they normally work is as follows - according to what they told me:

1. They login, open two more tabs (it could be more), copy and paste URL from the first one, after they have successfully logged in.

2. They start to work in tab 1 with a small form, just a minute to complete.

3. They repeat step 2 3 or 4 times.

4. Then they switch tabs, and attempt to do something with the other tabs. This is when they are asked to log back in.

I will come back with the requested code.

Charlie Arehart
Community Expert
Community Expert
March 21, 2019

Dani, I would not expect anything to prevent multiple tabs sharing a session. Still, as for what COULD have changed  do you now have the cf admin "j2ee sessions" feature on or off? Do you know if it was on or off before? And what about the settings at the bottom of that "memory variables" page?

Indeed, do you have any way to compare what the values were before? Did you preserve any aspect of the cf11 install before removing it? 

/Charlie (troubleshooter, carehart. org)
Dani Szwarc
Inspiring
March 21, 2019

Hi Charlie, first of all, thank you for your time.

It wasn’t me who removed CF in the first place. I came into the scene when things weren’t working.

Having said this, no, I don’t have any reference to the old settings.

The j2ee sessions checkbox is on and I wouldn’t know if it wasn’t on before.

The reason we found this issue is because of many ’variable datasource undefined in session’ errors. The troubleshooting shown that having one tab inactive while working with another tab or window will make the session to timeout if user didn’t do anything on the inactive tab.

What I have read online is that the tabs should keep the session by default.

This is quite weird. I will keep testing tomorrow.