views:

344

answers:

2

If you are connected to the Internet directly (and not through a proxy) and requests for a page (get/post) in Internet Explorer 7, the default time-out is 1 minute. If the response from the web server takes more than a minute then you end up getting a "Network error" from IE.

How can I increase this timeout in IE?

Microsoft has documented How to change the default keep-alive time-out value in Internet Explorer, but this does not work in my PC (Windows XP SP2, IE 7.0).

Does anyone out there have a clue on how to achieve this?

Thanks

A: 

From the same article,

If either the client browser (Internet Explorer) or the Web server has a lower KeepAlive value, it is the limiting factor. For example, if the client has a two-minute timeout, and the Web server has a one-minute timeout, the maximum timeout is one minute. Either the client or the server can be the limiting factor.

This may be the reason the settings are not working for you.

Niyaz
@Niyaz: Valid point, but I dont get this problem when connected through a proxy. The page returns OK after 3 minutes and from this my inference is that the web server timeout is OK.
Nahom Tijnam
+2  A: 

KB813827 is talking about HTTP 1.1 keepalives, which are to do with keeping a TCP connection to the server open outside of a request. That's not the same thing as your problem, which is keeping a connection alive during a request. To configure the per-connection timeout see KB181050.

Assuming the programming angle here is that you are trying to write a server-side script that takes a long time to complete:

To avoid the request timing out, you need to have the server-side script return something every so often to reassure the browser that the server hasn't died and a result will be forthcoming.

How exactly you might do this depends on what server-side technologies you're using. Anything that waits for the entire response body and headers to be completed before sending anything back to the client is out. In eg. CGI you could return a response body with 'Transfer-Encoding: chunked' to spit out a few bytes every so often and keep the connection alive.

Alternatively, return a page right away and spawn the long process in the background, then have the client side page poll for its completion.

bobince
@bobince: In the web server, the page is calling some methods from a third party system which is taking a long time (more than 60 secs) to complete. I guess your last statement is what I could use here. Would it be possible for you to recommend any samples on the Internet using similar method?
Nahom Tijnam
What programming language, web server? On a *nix server you might double-fork to "daemonize" your lengthy process from the script, or have a 'processing job' backend process in the background that web scripts can talk to via a socket.
bobince
Quite an old web app; ASP / COM talking to SAP RFC. The SAP RFC is the time consuming process.
Nahom Tijnam