10038 Error when using TIdHTTP component in ISAPI dll running in iis 7 windows 2008 64 bit

Giganews Newsgroups
Subject: 10038 Error when using TIdHTTP component in ISAPI dll running in iis 7 windows 2008 64 bit
Posted by:  Hans Fladsrud (hanskristian_fladsr…@yahoo.com)
Date: Fri, 12 Nov 2010

Hi, I am using Delphi 2007 with Indy 10.

I have an ISAPI dll that I run in iis 7 on windows 2008 64 bit.

The dll is a loadbalancer that connects to a number of Intraweb
standalone servers on the same machine.

When there is around 400 concurrent connections to the ISAPI dll. I keep
getting 10038 errors.

I have added some logging in the Indy code and so far I have seen the
error in 3 different places in the IdStackWindows unit:

function TIdStackWindows.WSSocket:
Sometimes the handle that is returned from this function is invalid.
When calling GetLastError in this function I get 10038 returned.

class function TIdSocketListWindows.FDSelect:
Most of the time I get the 10038 error in this function when
GBSDStack.CheckForSocketError is called.
When getting the error in this function it is called by function
TIdSocketListWindows.SelectRead.

procedure TIdStackWindows.Connect:
I have seen the error here only once, when
CheckForSocketError(IdWinsock2.connect(ASocket, PSOCKADDR(@LAddr),
LSize)); is called.

As a test I create a standalone application with a TidWebbrokerbridge
component using the exact same webmodule as my ISAPI. This one runs fine
wihtout any problems on the same server. Even with 1000 concurrent users.

I have been running this ISAPI for a few years without any problems on
iis6 and win 2003 servers. The isapi has also been tested on iis7 and
windows 2008 32 bit with no problems.

Any help would be very much appreciated

Thanks
Hans

Replies