Hi all,

I'm using Tomcat 7.0.25 (running on a Oracle JDK 1.7.0_03) on a Windows Server 
2008 (32-Bit), with IIS 7.0 and the ISAPI 1.2.32 connector (with chunked 
encoding enabled) to pass HTTP requests to Tomcat.


Since IIS 7.0, there is a response buffering that also applies to responses 
from the ISAPI redirector.
This means that even when I call flush() on the Servlet's OutputStream, the 
previous content is not sent to the user, until IIS's response buffer is full.

However, as I don't want this behavior (when I call flush(), I'd like the 
response to be immediately sent to the client), I found a way to disable the 
response buffer, by running the command:

appcmd set config "myhostname.com" /section:handlers 
-[name='ISAPI-dll'].ResponseBufferLimit:1

This will set the response buffer size to 1 byte for the virtual host 
"myhostname.com". I can't use 0, as this causes problems with 4xx/5xx status 
codes (where IIS uses its own error pages), so I'm using 1 here. Now when I 
send some bytes to the response and then flush(), the bytes will immediately be 
sent to the client (as it was in IIS 6).

However, now I also get errors in the ISAPI log, like these:

[Sun Feb 19 22:31:05.885 2012] [11976:8708] [error] 
isapi_write_client::jk_isapi_plugin.c (1250): WriteClient failed with 87 
(0x00000057)
[Sun Feb 19 23:57:24.820 2012] [11976:3004] [error] 
iis_write::jk_isapi_plugin.c (1337): Vector write of chunk encoded response 
failed with 87 (0x00000057)
[Mon Feb 20 00:13:10.128 2012] [11976:10244] [error] 
iis_write::jk_isapi_plugin.c (1337): Vector write of chunk encoded response 
failed with 1229 (0x000004cd)

I suppose this is because some clients abort the connection, before the 
response could be fully sent. When IIS response buffering was enabled, probably 
the ISAPI connector didn't see the errors as IIS mostly consumed the whole 
output before sending anything to the client (as with IIS 6.0, I also regularly 
got such errors, but with error number 10053).

However, I'm a bit worried about the error number 87, as some sites say about 
Winsock error 87:
  "Winsock error 87. WSA_INVALID_PARAMETER - One or more parameters are 
invalid."
(when it says, some parameters are invalid, it sounds like there is an 
unexpected error here).

Normally, when a client aborted the TCP connection, I would get a 10053 or 995 
error.
Are the errors 87 and 1229 expected in such cases?


Thanks!

Best Regards,
Konstantin Preißer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to