Browser Timeout

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.

LVL 14
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.

avnerAuthor Commented:
Thanks, Any idea how to control this timeout on Tomcat or sunONE ?
Look in httpd.conf for lines looking like this:

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

Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

And for SunONE:

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

   1. Modify either the or file.

      In the file, add the following line:,timeOut=300,reapInterval=150

      In the 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:

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


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
avnerAuthor Commented:
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.
Sorry, the Tomcat timout value was set in server.xml, not in httpd.conf

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.

avnerAuthor Commented:
Read the following thread, also search for "timeout HTTP session" :

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.
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.

avnerAuthor Commented:
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 ?
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.

avnerAuthor Commented:
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.
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:

  window.setTimeout("killRequest()", 40000);

You see?

avnerAuthor Commented:
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.

That is strange.

Is your request a simple form.submit() or something else?
avnerAuthor Commented:
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 ?

Show me the complete example or send it to

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.

avnerAuthor Commented:
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");

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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.