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
  • 228
  • 3
  • 14

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
  • 278
  • 2
  • 9
-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
  • 50,857
  • 7
  • 52
  • 134
  • I think you're referring to something else on that page, not the parameters I'm looking at. They even give an example of headerWaitTimeout="00:00:30" – Nik Jun 12 '14 at 17:30
  • That may or may not be the case. The documentation is not totally clear - but it is all that I have. I am doing web related stuff on and off for a long time and never had a reason to change those values ;) – TomTom Jun 12 '14 at 17:33
  • Set headerTimeoutOut to 1:10 and applied. No difference - still not getting disconnected. – Nik Jun 12 '14 at 21:27
  • Timeouts do not work precisely to that limit. Programmers already know that :-) There are also automatic retries built into the .net system that makes the system try some three times before giving up. This means that if you set a timeout of 3 seconds, it could take upto 18 seconds for the process to actually timeout. However, all logs will continue to report that the connection timed out at the configured 3 seconds, confusing the heck out of you. –  Jun 13 '14 at 13:06