tags:

views:

753

answers:

2

All, I have a web site that produces reports based upon user inputs in to a web page (queries a backend DB) using classic ASP and crystal reports. If the report takes over 30 minutes to run the firewall that sits in between the client and the web server drops the connection as it has been sat idle, so the report never gets displayed to the user. To avoid this I need to use some sort of keep alive, either HTTP or TCP.

The web server in Windows 2000 on IIS 6. I've created the registry keys in Windows for the TCP keepalive (and disabled the TCP offload features in the network card which I've heard can causes issues), however IIS doesn't seem to use this by default. I did download and test on the server a socket tester called TCP/IP Builder (www.drk.com.ar) which allows you to turn on and off the keepalive which works fine so I know the server can send them.

Does anyone know how to force IIS to use TCP Keepalives as I'm presuming that it must be 'enabled' for IIS ?

thanks!

A: 

Here's the "either", HTTP one: Enabling HTTP Keep-Alives (IIS 6.0)

Mr. Smith
Unfortunately that won't solve the problem, as enabling HTTP keepalive has little to do with tcp keepalives.
nos
"To avoid this I need to use some sort of keep alive, either **HTTP** or TCP."
Mr. Smith
have to admit I was really after getting TCP keepalive's working. HTTP keepalives (as shown in the link) is already enabled but doesn't seem to resolve the issue - thanks Watcher_60
A: 

Its not a IIS setting but a system wide OS one, by default it is set to a ridiculously high 2hours (based on the 1989 spec for TCP: http://tools.ietf.org/html/rfc1122#page-101)! But you can change the KeepAliveTime in the registry to a more practical time (for todays comms - as you have found out timeout way before that), heres how (from: http://support.microsoft.com/kb/120642):

In: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

Tcpip\Parameters Adapter Name\Parameters\Tcpip

Optional parameters configurable using Registry Editor These parameters normally do not exist in the registry. They may be created to modify the default behavior of the TCP/IP protocol driver.

KeepAliveTime Key: Tcpip\Parameters Value Type: REG_DWORD - Time in milliseconds Valid Range: 1 - 0xFFFFFFFF Default: 7,200,000 (two hours) Description: The parameter controls how often TCP attempts to verify that an idle connection is still intact by sending a keep alive packet. If the remote system is still reachable and functioning, it will acknowledge the keep alive transmission. Keep alive packets are not sent by default. This feature may be enabled on a connection by an application.

As to what value to use Im still trying to find out myself ( http://stackoverflow.com/questions/3907537/keep-alive-tcp-ip-connected-sockets-over-the-internet-when-how-and-how-much ) but it sounds like you want something less than your known 30 mins (which I think is v. long by the way).

Mrk Mnl