Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Browser Timeout

Posted on 2003-11-10
19
Medium Priority
?
6,135 Views
Last Modified: 2007-12-19
Any idea how to configure HTTP call timeout ?
Also any information will be helpful (for example who defines the timeout , Browser or Web-Server ) ?

Any help would be greatly appreciated.


-Avner
0
Comment
Question by:avner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 11
  • 8
19 Comments
 
LVL 10

Expert Comment

by:NetGroove
ID: 9714903
Not absolutely sure, but from my experience is the timeout value set on server. You can set it to several hundred minutes, longer then one hour, and the time out is triggered by server.

Most web server do have several timeout values for different procession environments.

The browser timeouts are from failing connection establishing. But after the browser request is correctly posted to web server is the timeout control on server side.

0
 
LVL 14

Author Comment

by:avner
ID: 9714926
Thanks, Any idea how to control this timeout on Tomcat or sunONE ?
0
 
LVL 10

Expert Comment

by:NetGroove
ID: 9714983
Look in httpd.conf for lines looking like this:

<Context path="" docBase="/home/webhome/myfoo/"
defaultSessionTimeout="60" />

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Expert Comment

by:NetGroove
ID: 9715006
And for SunONE:

How do I set the maximum number of sessions allowed on iPlanet Web Server?

   1. Modify either the context.properties or servlets.properties file.

      In the context.properties file, add the following line:

      context.global.sessionmgr.initArgs=maxSessions=2000,timeOut=300,reapInterval=150

      In the servlets.properties file, add the following line:

      servlets.sessionmgr.initArgs=maxSessions=2000,time Out=300,reapInterval=150
   2. To invoke the new value, restart the server.

Copied form here:
http://developers.sun.com/sw/docs/faqs/appserver/iws_faq.html

0
 
LVL 10

Accepted Solution

by:
NetGroove earned 2000 total points
ID: 9715020
My assumption is that upper numbers are seconds.
Only to clarify, because I was talking about minutes. That was on my server: Lotus Notes Domino

0
 
LVL 14

Author Comment

by:avner
ID: 9715025
NetGroove, these are both "sesssion timeouts".

When browser is connecting to the web-server a "sesison" is created, timeout is the time the session was inactive.

I'm looking for a specific HTTP call timeout.

I just recived the following note :
In Internet Explorer 4.01 Service Pack 1 or later (IE 5, 5.5, 6), you can
change the timeout by adding a ReceiveTimeout DWORD value in registry key:
HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Internet
Settings with a data value of (number of seconds)*1000. To set a 2 minute
timeout duration, set the ReceiveTimeout data value to (2*60*1000) = 120000.
Restart your computer.


And I'm going to check it out.
0
 
LVL 10

Expert Comment

by:NetGroove
ID: 9715046
Sorry, the Tomcat timout value was set in server.xml, not in httpd.conf

0
 
LVL 10

Expert Comment

by:NetGroove
ID: 9715096
Ok, that parameter is a very good point.

But late me state my definitive note: in HTTP there is no such thing like a session. Full stop.
Every browser request is a single request with its own response. After the response there is no session.

Of course do the server track a user by ip and establish a session for that node, but http is not a session bound protocol.
Therefore also do not exist such things like session timeouts after idle time. Only timeout after no response.

This does not confuse with user logon session established by cookies or by URL parameter sessions or by hidden form fields sessions. They are observed by server and discarded after some configured idle time after last served request. But again, this is not a http request timeout, it is a virtual session timeout.





0
 
LVL 14

Author Comment

by:avner
ID: 9715128
Read the following thread, also search for "timeout HTTP session" :

http://www.mail-archive.com/orion-interest@orionserver.com/msg14196.html


There is defiently something that is called a "Session" under HTTP and is supported by all  web-serves and all browsers, If I'm not wrong it is automatically handled using cookies.
0
 
LVL 10

Expert Comment

by:NetGroove
ID: 9715192
No, it is not handled automatically, it is handled solely by web server.

Basic problem is that there is no session for http. Therefore it is an absolutely problem to logoff from a realm when you told your userid and password to your browser. The browser cached your userid and password for particular realm and send it to that realm even day after you entered in browser if you did not stop the browser in meantime. It was even worse: there was no regular method to logout from that real except a complete browser stop or receiving a tricky response 401 for that realm to force a new logon.
To solve that dilemma with the basic http authentication most web server offer their method of http logon and name it session. That session are user logon tables managed by web server and sending cookies to client browser to keep reference to corresponding user name table entry on web server. The garbage collection is managed by web server logout commands or session timeouts.

But again, this logon methods are under the control of the web server (of course is the browser able to destroy the session cookie) but there is no such thing like http session standard RFC how to handle browser sessions. Every http sever implements its own session behavior.

0
 
LVL 14

Author Comment

by:avner
ID: 9715329
Ok, I understand your point, since HTTP sessions are so common and well supported, I thought it was some sort of HTTP standard.

To my specific issue, the Registry key I listed above did solve my problem, but I'm looking for a way to do that fro the web-server's end.

Any ideas about this one ?
0
 
LVL 10

Expert Comment

by:NetGroove
ID: 9715370
The simplest one is that your web server sends every sixty seconds one single blank to the browser and so keeps the session (the request :) alive until full response can be sent to browser.

0
 
LVL 14

Author Comment

by:avner
ID: 9715392
Yeah, the problem is that I want it the other way around.

I want to make the timeout shorter then it currently.

We are working with something like that :

Browser >>> Web-server (Servlets) >>>> DCOM (Com+/ MTS) >>> C++ BG objects.


And sometimes the call between the Web-Server and the DCOM just hangs, we are unable to understand why and when.

And so, for a temporary workaround we want to limit the timeout to 40 seconds and then the client will not have to wait for so long even if something had stopped responding.
0
 
LVL 10

Expert Comment

by:NetGroove
ID: 9715593
You can of course start a timer interval which will invoke some action if the response from web server does not rewrite the submiting request page.
Is this idea something for you? You know, I am talking about this:

  document.myForm.submit();
  window.setTimeout("killRequest()", 40000);

You see?

0
 
LVL 14

Author Comment

by:avner
ID: 9715610
When the HTTP call is hanging no JavaScript can be executed, the explorer is at "halt" mode and everything seems to be stuck, the only way to continue is killing the process through Task Manager.



0
 
LVL 10

Expert Comment

by:NetGroove
ID: 9715665
That is strange.

Is your request a simple form.submit() or something else?
0
 
LVL 14

Author Comment

by:avner
ID: 9715696
No, it's an XMLHTTP request using the MSXML object.

Do you think that in case of form.submit() it will not hang ? if so than whay would killRequest() do ?
0
 
LVL 10

Expert Comment

by:NetGroove
ID: 9715765
Uhps!

Show me the complete example or send it to netgroovy@yahoo.com

First question is whether you call the send() method in asynchronous mode or not. I suppose you have set it to true, so it is synchronous and hanging.

Send me your html page for analysis, or paste it here.



0
 
LVL 14

Author Comment

by:avner
ID: 9720502
Unfurtunatly it is not that simple the method I'm using is something like that :


Unfortunately it is not that simple the method I'm using is something like that :

function XmlHttpRes (sUri,Synchronic, Param , postMethod, bAddRequestHeader)
            {

                  var bSynchronic  = (Synchronic==null || typeof (Synchronic)=="undefined") ?false : Synchronic ; // defaulted to async sent;
                  var sPostMethod = (typeof postMethod=="undefined")? "GET" : postMethod ; //Method of post is defaulted to GET
                  var sParam =  (Param==null || typeof (Param)=="undefined") ? null : Param ; //Set the Sent Data Param
                              
                        this.oXML= new ActiveXObject("MSXML2.XMLHTTP");      
                        this.oXML.Open(sPostMethod, sUri, bSynchronic);
                        if (bAddRequestHeader)
                              {
                                    this.oXML.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
                              }
                        this.oXML.Send(sParam);
      }



As you can see I use different params to use different types of call (some times it's synchronic and some times it's not) and therefore I can't really give you a specific example.

The hang itself occures on different times and we suspect the problem is on the LoadBalancer,  but what we want for now is something very "simple" :  if freezing occurs, make users wait as less as possible.

Thanks for the help so far.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question