Board index » delphi » INDY 8 using TidTCPServer and Socket Error # 10061 - Connection refused

INDY 8 using TidTCPServer and Socket Error # 10061 - Connection refused

Using the modified demo from
..\Borland\Delphi6\Demos\Indy\TCPStreamClientServer (using it to serve
pictures, technical documents, and other multimedia for our website,
http://www.midwayusa.com) and it has been working great (over 500,000 hits a
day with nearly instantaneous response), but the last couple of weeks the
client receives the above error (Connection refused), but not all the time
(yesterday got to nearly 200,000 hits before stopping).

What's weird is memory and CPU utilization is less than 5% (I don't suspect
a memory leak) and to get things going again, all I have to do is close the
application and restart it.  No exceptions, nothing (app takes off serving
pictures, etc).

Our network guys swears nothing has changed on the network and I don't know
how to troubleshoot this kind of quirk.  Any ideas/suggestions?

Thanks for any info,
krf

Misc info:
D6 Enterprise - all the service packs
App runs on a WinNT 2K server

 

Re:INDY 8 using TidTCPServer and Socket Error # 10061 - Connection refused


The 10061 error is begin report by Microsoft ISA Server.  You must have the
machine protected from the Internet by an ISA server.  I spent weeks
tracking the same problem but from a client perspective... Move the machine
out from behind ISA and it worked fine, put it back behind and we got the
errors again.

Basically we tracked it down to ISA is opening too many connections to IIS
and would not release them... Then IIS ran out of connections.  We cannot
find, as of yet, any solution from MS.

Our solution for now is to turn down the number of clients that hit the
server, AND move the server behind a CISCO PIX firewall.

Quote
"Kevin Frevert" <kfrevert@workdrinkingcoffeedotcom> wrote in message

news:3d3fefc4$1_2@dnews...
Quote
> Using the modified demo from
> ..\Borland\Delphi6\Demos\Indy\TCPStreamClientServer (using it to serve
> pictures, technical documents, and other multimedia for our website,
> http://www.midwayusa.com) and it has been working great (over 500,000 hits
a
> day with nearly instantaneous response), but the last couple of weeks the
> client receives the above error (Connection refused), but not all the time
> (yesterday got to nearly 200,000 hits before stopping).

> What's weird is memory and CPU utilization is less than 5% (I don't
suspect
> a memory leak) and to get things going again, all I have to do is close
the
> application and restart it.  No exceptions, nothing (app takes off serving
> pictures, etc).

> Our network guys swears nothing has changed on the network and I don't
know
> how to troubleshoot this kind of quirk.  Any ideas/suggestions?

> Thanks for any info,
> krf

> Misc info:
> D6 Enterprise - all the service packs
> App runs on a WinNT 2K server

Re:INDY 8 using TidTCPServer and Socket Error # 10061 - Connection refused


Jason,

  Thanks for the response.

Our network is behind an ISA server, but because how our admin has things
set up, I'm not 100% sure about that machine (the machine was set up before
the switch to ISA).  I'll check it out.

When you wrote 'ISA is opening too many connections'..from what perspective
did you mean?  The client (our web servers) accesses the media server via
the TipTCPClient->TipTCPServer...is ISA opening too many connections to my
server application or is my server application not freeing the connections
(because of ISA)?

Are there any technical docs (from Microsoft or whoever) explaining the
quirks with ISA server?

Thanks again,
krf

Quote
"Jason Nethercott" <Ja...@Autodata.Net> wrote in message

news:3d405eaa$1_2@dnews...
Quote
> The 10061 error is begin report by Microsoft ISA Server.  You must have
the
> machine protected from the Internet by an ISA server.  I spent weeks
> tracking the same problem but from a client perspective... Move the
machine
> out from behind ISA and it worked fine, put it back behind and we got the
> errors again.

> Basically we tracked it down to ISA is opening too many connections to IIS
> and would not release them... Then IIS ran out of connections.  We cannot
> find, as of yet, any solution from MS.

> Our solution for now is to turn down the number of clients that hit the
> server, AND move the server behind a CISCO PIX firewall.

Re:INDY 8 using TidTCPServer and Socket Error # 10061 - Connection refused


Jason,

  Thanks for the response.

Our network is behind an ISA server, but because how our admin has things
set up, I'm not 100% sure about that machine (the machine was set up before
the switch to ISA).  I'll check it out.

When you wrote 'ISA is opening too many connections'..from what perspective
did you mean?  The client (our web servers) accesses the media server via
the TipTCPClient->TipTCPServer...is ISA opening too many connections to my
server application or is my server application not freeing the connections
(because of ISA)?

Are there any technical docs (from Microsoft or whoever) explaining the
quirks with ISA server?

Thanks again,
krf

Quote
"Jason Nethercott" <Ja...@Autodata.Net> wrote in message

news:3d405eaa$1_2@dnews...
Quote
> The 10061 error is begin report by Microsoft ISA Server.  You must have
the
> machine protected from the Internet by an ISA server.  I spent weeks
> tracking the same problem but from a client perspective... Move the
machine
> out from behind ISA and it worked fine, put it back behind and we got the
> errors again.

> Basically we tracked it down to ISA is opening too many connections to IIS
> and would not release them... Then IIS ran out of connections.  We cannot
> find, as of yet, any solution from MS.

> Our solution for now is to turn down the number of clients that hit the
> server, AND move the server behind a CISCO PIX firewall.

Re:INDY 8 using TidTCPServer and Socket Error # 10061 - Connection refused


Too many connections for us, was the TCP connections from ISA to IIS...
Client connects to ISA, ISA verifies the security then connects to IIS...
The second connection, between ISA and IIS...

If you find docs, please let me know.  We were ALL over MSDN and the web and
found only a single article even remotely talking about this issue, and it
was from a way old version of ISA, when it was called Proxy Server...

Quote
"Kevin Frevert" <kfrevert@workdrinkingcoffeedotcom> wrote in message

news:3d40659b_2@dnews...
Quote
> Jason,

>   Thanks for the response.

> Our network is behind an ISA server, but because how our admin has things
> set up, I'm not 100% sure about that machine (the machine was set up
before
> the switch to ISA).  I'll check it out.

> When you wrote 'ISA is opening too many connections'..from what
perspective
> did you mean?  The client (our web servers) accesses the media server via
> the TipTCPClient->TipTCPServer...is ISA opening too many connections to my
> server application or is my server application not freeing the connections
> (because of ISA)?

> Are there any technical docs (from Microsoft or whoever) explaining the
> quirks with ISA server?

> Thanks again,
> krf

> "Jason Nethercott" <Ja...@Autodata.Net> wrote in message
> news:3d405eaa$1_2@dnews...
> > The 10061 error is begin report by Microsoft ISA Server.  You must have
> the
> > machine protected from the Internet by an ISA server.  I spent weeks
> > tracking the same problem but from a client perspective... Move the
> machine
> > out from behind ISA and it worked fine, put it back behind and we got
the
> > errors again.

> > Basically we tracked it down to ISA is opening too many connections to
IIS
> > and would not release them... Then IIS ran out of connections.  We
cannot
> > find, as of yet, any solution from MS.

> > Our solution for now is to turn down the number of clients that hit the
> > server, AND move the server behind a CISCO PIX firewall.

Re:INDY 8 using TidTCPServer and Socket Error # 10061 - Connection refused


Jason,

  Thanks for the information.

I'm trying to justify that INDY's components are stable and that I
can/should start using these components to solve a number of problems we are
having (one is keeping all the files in synch between our 4 web
servers...it's a long story).  Because of this quirk, the "powers-that-be"
feel DOS batch files are a better choice for keeping files in synch and we
should hard-code network paths in our applications (another long "Dilbert"
story behind that one),

This morning at 4:00AM it happened again, and I think it happened the exact
time yesterday (I placed a TTimer on the form and continually check for
inactivity).  As a hack, if there is no activity for 30 seconds, I set the
TidTCPServer.Active := False/True which seems to "work" (sometimes that
causes an access violation).

Our network guy was out yesterday so I don't know yet how he has the ISA
server configured (I'll reply when I find out)

Thanks again,
krf

BTW: If you want to see the app working go to http://www.midwayusa.com , all
pictures and technical information is served by the Indy TCP/IP server app
(running on another box) accessed by an ISAPI dll (I wrote that too :)

Quote
"Jason Nethercott" <Ja...@Autodata.Net> wrote in message

news:3d406a24$1_2@dnews...
Quote
> Too many connections for us, was the TCP connections from ISA to IIS...
> Client connects to ISA, ISA verifies the security then connects to IIS...
> The second connection, between ISA and IIS...

> If you find docs, please let me know.  We were ALL over MSDN and the web
and
> found only a single article even remotely talking about this issue, and it
> was from a way old version of ISA, when it was called Proxy Server...

> "Kevin Frevert" <kfrevert@workdrinkingcoffeedotcom> wrote in message
> news:3d40659b_2@dnews...
> > Jason,

> >   Thanks for the response.

> > Our network is behind an ISA server, but because how our admin has
things
> > set up, I'm not 100% sure about that machine (the machine was set up
> before
> > the switch to ISA).  I'll check it out.

> > When you wrote 'ISA is opening too many connections'..from what
> perspective
> > did you mean?  The client (our web servers) accesses the media server
via
> > the TipTCPClient->TipTCPServer...is ISA opening too many connections to
my
> > server application or is my server application not freeing the
connections
> > (because of ISA)?

> > Are there any technical docs (from Microsoft or whoever) explaining the
> > quirks with ISA server?

> > Thanks again,
> > krf

> > "Jason Nethercott" <Ja...@Autodata.Net> wrote in message
> > news:3d405eaa$1_2@dnews...
> > > The 10061 error is begin report by Microsoft ISA Server.  You must
have
> > the
> > > machine protected from the Internet by an ISA server.  I spent weeks
> > > tracking the same problem but from a client perspective... Move the
> > machine
> > > out from behind ISA and it worked fine, put it back behind and we got
> the
> > > errors again.

> > > Basically we tracked it down to ISA is opening too many connections to
> IIS
> > > and would not release them... Then IIS ran out of connections.  We
> cannot
> > > find, as of yet, any solution from MS.

> > > Our solution for now is to turn down the number of clients that hit
the
> > > server, AND move the server behind a CISCO PIX firewall.

Other Threads