2

So I've configured IIS8.5 on Win 8.1, like so:

appcmd.exe set config -section:system.applicationHost/webLimits /connectionTimeout:"00:00:03" /commit:apphost

I've verified that the setting appears applied.

I've done an IISRESET (in desperation), but the setting seems to be ignored.

If I telnet to IIS, and don't send any content, I don't get disconnected after 3s as expected.

I actually started all this by trying to get this to work:

appcmd.exe set config -section:system.applicationHost/webLimits /headerWaitTimeout:"00:00:30" /commit:apphost

i.e. for it to disconnect me after not sending all the headers after 30s. That also didn't work - stay connected as long as I like.

I've read the docs (http://www.iis.net/configreference/system.applicationhost/weblimits) and am fairly confident the semantics are correct.

Why is the limit not being applied?

Thanks.

Nik
  • 238

2 Answers2

0

First of all, I found you had to actually perform an HTTP request to get the connection timeout to kick in e.g entering.

telnet <webserver> 80
GET / HTTP/1.0
Connection: keep-alive

Once this is set, I found that system.applicationHost/webLimit/connectionTimeout does not work, but system.applicationHost/sites/[Default Web Site]/limits/connectionTimeout does work fine. It can be set through the IIS console or using appcmd.exe as follows:

appcmd.exe set config -section:system.applicationHost/sites "/[name='Default Web Site'].limits.connectionTimeout:00:00:03" /commit:apphost

https://docs.microsoft.com/en-us/iis/configuration/system.applicationhost/sites/site/limits

Minkus
  • 380
-1

The documentation at

http://www.iis.net/configreference/system.applicationhost/weblimits

says:

Every 60 seconds, a worker process checks how long it has been idle. If its current idle time is greater than the idle time-out value specified by the Windows Process Activation Service (WAS), the worker process initiates a shutdown.

Now, when the proess checks every 60 seconds then - ah - 3 or 30 second timeout makes no sense because it is anyway only checked every 60 seconds. It makes little sense anyway as it bypasses the HTTP 1.1 keepalive attempts to avoid reestablishment overhead.

TomTom
  • 52,109
  • 7
  • 59
  • 142