• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Session timeout when multiple windows are open

Participant ,
Mar 20, 2019 Mar 20, 2019

Copy link to clipboard

Copied

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!

TOPICS
Server administration

Views

2.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 20, 2019 Mar 20, 2019

Copy link to clipboard

Copied

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)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 20, 2019 Mar 20, 2019

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 21, 2019 Mar 21, 2019

Copy link to clipboard

Copied

Good morning again Charlie, here is a screen capture of the setting in the Memory Variables.

2019-03-21_08-13-26.png

Something I have noticed is that most of the "Datasource variable undefined in session" errors in the CF log relate to CFCs.

My own test did not reproduce the issue, with just two tabs open and working only with the first one.

Thank you again!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2019 Mar 21, 2019

Copy link to clipboard

Copied

A couple of more things...

I'm assuming you confirm that the errors are commensurate with real users saying they got the error? If not, they could be due to some automated mechanism calling the pages.. Just a thought.

And have you confirmed that there were no errors in the updates themselves? For more see:

Having problems after applying a CF update? What to check first! - ColdFusion


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 21, 2019 Mar 21, 2019

Copy link to clipboard

Copied

Yes, those are errors that real users reported and one of the developers was able to replicate with 3 tabs open at the same time and leaving two of them unattended.

As per the CF updates, since it was a fresh installation, all the updates were done right after the server installation itself and  the process did not report any error, but I will check the logs.

I am asking more questions to the people experiencing this issue as I write here, so I may come back with more information.

Thank you very much once again Charlie.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 22, 2019 Mar 22, 2019

Copy link to clipboard

Copied

Ok, this has turned to be something else: with one tab only open and while working on it, users are being kicked out.

The Session timeout in the <cfapplication> tag is set to 20 minutes.

I am very confused. This is a secure connection, not sure if this setting has something to do with the issue.2019-03-22_09-32-33.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 25, 2019 Mar 25, 2019

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 26, 2019 Mar 26, 2019

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation