cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected loss of user session

Former Member
0 Kudos

Hi All,

I am on a project using an AJAX call to a MII transaction that runs every 1 minute. This call returns some data to the user's screen and automatically update the "Last Access Time" (in the Active Sessions screen) keeping the session opened for the active user.

The problem is that after about 26 hours, the user session is unexpectedly closed, even before reaching the "Expiration Date".

Do you have any experience with this unexpected loss of session?

I am using version 12.0.6 Build (14).

Thanks and Regards,

Henry

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Henry,

You already tried to use the code below?


< meta http-equiv="refresh" content=" 3600 " / >

Perhaps this solves the problem or is a bug

Danilo

Former Member
0 Kudos

Hi Danilo,

I tried use this code but the error also occurs.

After some time the session is unexpectedly closed.

Regards,

Henry

sidnooradarsh
Contributor
0 Kudos

Hi Henry,

This might happen when a user's Internet browser preferences have been set to prohibit the reloading (and refreshing) of Web pages that have been previously visited and stored in its cache. If the browser prohibits the reload/refresh then session ID of web page will not be updated and it expires.

Set your IE settings to following:-

Tools --> Internet Options > Settings> Select the radio button 'Every visit to the page' or radio button 'Automatically' under the heading 'Check for newer versions of stored pages'

After doing above settings close your browser and re-start your application.

Make sure that 'Never' radio button is not selected under the heading 'Check for newer versions of stored pages'

Regards,

Adarsh

Former Member
0 Kudos

Hi Adarsh, thanks for your reply.

I'm using a timestamp variable at the end of the URL call. In this case the request never will be stored in the browser's cache.

Please see the source code below:

var url = "/XMII/Runner?Transaction=Project/Transaction&OutputParameter=Output&Plant=001&Timestamp="+new Date();
httpRequest.open("GET", url, true);
httpRequest.send(null);

Regards,

Henry

jcgood25
Active Contributor
0 Kudos

Assuming your TRX returns an xml document in Rowsets/Rowset/Row format, have you tried wrapping the elements in your sample URL with an Xacute Query template and calling it through the Illuminator servlet instead of Runner? It would eliminate any potential issues with calling Runner directly, outside of the normal http query mechanism used by the applets, etc.

Former Member
0 Kudos

Good idea! I will try to do this now.

Thank you very much Jeremy.

Henry

Former Member
0 Kudos

Jeremy, I changed the AJAX call to the url below:

var url = "/XMII/Illuminator?QueryTemplate=Project/DataProviderXacuteQuery&Param.1=001&Content-Type=text/xml&Timestamp="+new Date();
httpRequest.onreadystatechange = loadDataProvider;
httpRequest.open("GET", url, true);
httpRequest.send(null);

But the user session was unexpectedly closed again, about 28 hours after opened.

Regards,

Henry

jcgood25
Active Contributor
0 Kudos

Assuming the AJAX call is keeping the session alive every minute (or at least keeps it going for 28 hours), how are you initially authenticating the user session?

Does your NW system have multiple server node instances?

I assume that once the AJAX call fails it is receiving the html text from the NW login page?

Former Member
0 Kudos

The user session is initially authenticating by a transparent SSO and the Netweaver has only one note instance.

Yes, the AJAX received a HTML text with the NW login page, we are checking when it happens.

Regards,

Henry

jcgood25
Active Contributor
0 Kudos

With your system running on a single server node you should be able to accurately monitor the Active Session list from the Menu (System Management section) to see if your AJAX client updates are truly keeping the session alive. To prevent confusion you should use two separate machines (not 2 browser instances) and two separate logins, so as you watch or refresh the Acive Session screen you don't trigger the session updates.

Every subsequent request should essentially renew the expiration to a new future date that is equivalent to now() + Session Timeout (as defined in the System Management...System Administration Menu settings).

I would also be curious to see if a simle iGrid/iChart applet running with AutoRefresh enabled to the same refresh rate as your AJAX call also runs into the same problem. Perhaps another thing to try (non-applet) would be just to use the same http URL to the Illuminator servlet and add RefreshRate=xxx to the end of the URL (don't use text/xml output, keep it html). Since the html output uses IllumRowsetHTML.xsl you can leverage the RefreshRate which will add the meta tag automatically.

Edited by: Jeremy Good on Aug 21, 2009 9:18 AM

Former Member
0 Kudos

We're already doing this with 6 machines and 6 different logins. During the test monitoring through of Active Session screen, after 28 hours all 6 users sessions are unexpectedly closed one after another, even before reaching the "Expiration Date".

I will do the next test suggested by you...

Thanks again,

Henry

Former Member
0 Kudos

Henry,

is the exact time 27,77 hours? if yes, please modify the parameter "SessionExpirationPeriod". This parameter is in milliseconds.

How to modify:

1. Open Visual Admin.

2. Select the Tab Global Configuraiton.

3. Select the Server Entry.

4. Select Services

5. Select Security Provider

6. Update the Parameter "SessionExpirationPeriod" and click update. Don't forget to click on the save button.

7. Restart the NW instance.

Hope this will help you.

Regards

Pedro Iglesias

Former Member
0 Kudos

Pedro,

I changed the parameter and the problem was solved!

Thank you very much!

Henry

Former Member
0 Kudos

All,

Thank you for the help of all of you.

Regards,

Henry

Edited by: Henry Costa on Aug 27, 2009 1:03 PM

jcgood25
Active Contributor
0 Kudos

Should we assume you increased the number, or is there a -1 or 0 setting for infinity?

jcgood25
Active Contributor
0 Kudos

Should we assume you increased the number, or is there a -1 or 0 setting for infinity?

Former Member
0 Kudos

For simulate an "infinite user session" we changed the parameter to "blank", that worked very well.

But for security, we will increase to a value that means 1 week (in milliseconds).

Answers (0)