Board index » cppbuilder » Help with socket error 10053

Help with socket error 10053


2005-07-02 12:58:43 AM
cppbuilder64
I have a site that is getting 10053 errors and I am not sure how to handle
this in my application.
I have a central host that allows many clients to connect in a blocking
socket manner, so I am creating a thread for each active client connection.
So what happens is all works well for a number of hours then the 10053
errors start. This of course breaks the socket connection to the client and
then the client attempts to connect again. When the client connects the
10053 errors persist and clients cannot connect.
So can someone assist me in understanding why this error would start
occurring, and then once they start how do I get my application back into
the state where connections can resume. Would closing the master socket
assist me in this or is there something else I can do to re-establish a
solid connection to my client machines.
Any help in this would be most appreciated.
Thanks for any information.
Mike
 
 

Re:Help with socket error 10053

mike wrote:
Quote
I have a site that is getting 10053 errors and I am not sure how to handle
this in my application.
You did a search for what 10053 stands for ? Please supply the description
also.
Quote
I have a central host that allows many clients to connect in a blocking
socket manner,
Are you using raw sockets or an Indy component or something like that ?
Hans.
 

Re:Help with socket error 10053

Hans,
Thanks for answering. Yes the message description of the error is as
follows:
WSAECONNABORTED (10053) Software caused connection abort.
Berkeley description: A connection abort was caused internal to your host
machine. The software caused a connection abort because there is no space on
the socket's queue and the socket cannot receive further connections.
WinSock description: Partly the same as Berkeley. The error can occur when
the local network system aborts a connection. This would occur if WinSock
aborts an established connection after data retransmission fails (receiver
never acknowledges data sent on a datastream socket).
TCP/IP scenario: A connection will timeout if the local system doesn't
receive an (ACK)nowledgement for data sent. It would also timeout if a
(FIN)ish TCP packet is not ACK'd (and even if the FIN is ACK'd, it will
eventually timeout if a FIN is not returned).
I am using the TSocketServer from builder not Indy or any anything else.
Mike
"Hans Galema" < XXXX@XXXXX.COM >wrote in message
Quote
mike wrote:
>I have a site that is getting 10053 errors and I am not sure how to
>handle this in my application.

You did a search for what 10053 stands for ? Please supply the description
also.

>I have a central host that allows many clients to connect in a blocking
>socket manner,

Are you using raw sockets or an Indy component or something like that ?

Hans.
 

{smallsort}

Re:Help with socket error 10053

mike wrote:
Quote
I have a central host that allows many clients to connect in a blocking
socket manner, so I am creating a thread for each active client connection.
So what happens is all works well for a number of hours then the 10053
errors start.
How many connections are there usually whan that happens ? How do
the clients behave: do they come and go within a few minutes or
are they staying for hours ?
Quote
This of course breaks the socket connection to the client and
then the client attempts to connect again. When the client connects the
10053 errors persist and clients cannot connect.
So such a client can reconnect but then after a short time there is
the same error ? Is this for some specific clients or for all then?
What about clients that did not connect before the errors stated. Are
they handled ok ?
Quote
So can someone assist me in understanding why this error would start
occurring, and then once they start how do I get my application back into
the state where connections can resume.
Aha. So a client can not resume ? Please explain in detail.
Did you do test with all clients and the server on the same machine ?
Hans.
 

Re:Help with socket error 10053

Hans,
Thank you for replying, I appreciate it very much. This problem is really
causing my hair to turn grey and I really need to figure it out.
Quote
How many connections are there usually whan that happens ? How do
the clients behave: do they come and go within a few minutes or
are they staying for hours ?
Well I can't really determine how many connections there are when the
problem happens but I at any given point I could have 40 to 80+ machines
connected.
Once connected the clients stay connected for hours at a time.
Quote
So such a client can reconnect but then after a short time there is
the same error ? Is this for some specific clients or for all then?
Yes, once the problem starts a client may connect but in a very short time
the error occurs.
Also once the error starts all the previos clients start suffering the
problem, then they become dissconnected and now a really bad cycle starts as
they all begin to reconnect and the error occurs which means they disconnect
again and the cycle starts.
It effects all the clients, not a specific client.
Quote

What about clients that did not connect before the errors stated. Are
they handled ok ?

No, once the problem starts all clients are effected, new clients, old
clients, all clients.
Its like the Host Socket has gone ito some kind of error and it effects all
clients, both connecting and those previously connected.
Quote
Aha. So a client can not resume ? Please explain in detail.
Well what happens is the client detects the socket disconnect, and, once
this happens the client attempts to reestablish connection to the host. The
gets a connection, and a couple of messages are transmitted back and forth
and then the error happens, the client disconnects, the cycle starts over
again.
Quote

Did you do test with all clients and the server on the same machine ?
Ummmm, no, as this will be a very difficult thing to do as the problem is
happening at a client site.
I do have the same software running at other sites without any of the above
problems. But what I don't understand is why it could possibly be happening,
and also, once it starts to happen what can I do with the host application
to attempt to correct the situation.
Again, thanks Hans for trying to help me with this {*word*193} problem.
Mike
"Hans Galema" < XXXX@XXXXX.COM >wrote in message
Quote
mike wrote:

>I have a central host that allows many clients to connect in a blocking
>socket manner, so I am creating a thread for each active client
>connection. So what happens is all works well for a number of hours then
>the 10053 errors start.

How many connections are there usually whan that happens ? How do
the clients behave: do they come and go within a few minutes or
are they staying for hours ?

>This of course breaks the socket connection to the client and then the
>client attempts to connect again. When the client connects the 10053
>errors persist and clients cannot connect.

So such a client can reconnect but then after a short time there is
the same error ? Is this for some specific clients or for all then?

What about clients that did not connect before the errors stated. Are
they handled ok ?

>So can someone assist me in understanding why this error would start
>occurring, and then once they start how do I get my application back into
>the state where connections can resume.

Aha. So a client can not resume ? Please explain in detail.

Did you do test with all clients and the server on the same machine ?

Hans.
 

Re:Help with socket error 10053

mike wrote:
Quote
I do have the same software running at other sites without any of the above
problems.
Then it is very difficult to debug indeed. Is the OS different there ?
Or has the server much less RAM ? You should really count
your serverthreads so you know at which amount problems begin.
Quote
But what I don't understand is why it could possibly be happening,
and also, once it starts to happen what can I do with the host application
to attempt to correct the situation.
Did you try to delete all threads, Close() the TServerSocket and then
to Open() it again ?
Please have a look at the way you reply. It makes no sence to reply
selective and also totallly.
Hans.
 

Re:Help with socket error 10053

Hans,
Thanks for replying.
Quote
Then it is very difficult to debug indeed. Is the OS different there ?
Or has the server much less RAM ? You should really count
your serverthreads so you know at which amount problems begin.
Yes this is hard to debug. The server is running 2000server and it does not
have less ram then other sites where all work fine.
I will make a change to the server software to count the threads that are
open when the first 10053 error occurs and place that in a log file. At this
point I am not sure what the count is.
Quote
Did you try to delete all threads, Close() the TServerSocket and then
to Open() it again ?
No I have not tried that yet, but will modify the server software to do this
at the first 10053 received to see if this clears it up.
If I understand the error message description properly, the server is
sending a TCP message and not getting back the ACK from the client. Is it
possible that a router somewhere in the mix could be causing this to happen.
If so do you have any insight as to what I could ask the site to look for on
the router. I am not a router guy so I am at a bit of a loss on that.
It may take me a few days to get the software modified and installed at the
site to test.
Boy this is troublesome.
Thanks for the assitance.
Mike
"Hans Galema" < XXXX@XXXXX.COM >wrote in message
Quote
mike wrote:

>I do have the same software running at other sites without any of the
>above problems.

Then it is very difficult to debug indeed. Is the OS different there ?
Or has the server much less RAM ? You should really count
your serverthreads so you know at which amount problems begin.

>But what I don't understand is why it could possibly be happening, and
>also, once it starts to happen what can I do with the host application to
>attempt to correct the situation.

Did you try to delete all threads, Close() the TServerSocket and then
to Open() it again ?

Please have a look at the way you reply. It makes no sence to reply
selective and also totallly.

Hans.
 

Re:Help with socket error 10053

mike wrote:
Quote
If I understand the error message description properly, the server is
sending a TCP message and not getting back the ACK from the client. Is it
possible that a router somewhere in the mix could be causing this to happen.
Sorry, but that is beyond my knowledge. Could the errors be
caused by one clientconnection only ? Is that what you are suggesting ?
Not the serverrouter but a router somewhere in a cliets route ? Why is
it only after hours ?
Quote
>Please have a look at the way you reply. It makes no sence to reply
>selective and also totallly.
Apparantly you overlooked that. Please do not quote a complete message.
And certainly not if you already quoted selective.
Hans.
 

Re:Help with socket error 10053

Hans Galema wrote:
Quote
Sorry, but that is beyond my knowledge. Could the errors be
caused by one clientconnection only ?
If you log the 10053 error then you log the client-ip too ?
See if it is always the same one.
Hans.
 

Re:Help with socket error 10053

Hans,
Quote
Sorry, but that is beyond my knowledge. Could the errors be
caused by one clientconnection only ? Is that what you are suggesting ?
Not the serverrouter but a router somewhere in a cliets route ? Why is
it only after hours ?
No the problem happens during the day. The site is closed at night. The
reason I was wondering about a router or something like that is because I am
trying to explore all possibilities, and routers and such are certainly in
the mix.
Sorry about the replies, I have corrected my actions.
Mike
 

Re:Help with socket error 10053

Hans,
Yes I will log the IP as well. At this point I don't believe it is a single
client starting the problem, but I may be wrong on this.
Mike
"Hans Galema" < XXXX@XXXXX.COM >wrote in message
Quote
Hans Galema wrote:

>Sorry, but that is beyond my knowledge. Could the errors be
>caused by one clientconnection only ?

If you log the 10053 error then you log the client-ip too ?
See if it is always the same one.

Hans.
 

Re:Help with socket error 10053

First I want to thank Hans for taking the time to respond to my problem, I
apprciate it very much.
After many, many hours of studing and tracing the problem I have determined
that it is not a software problem but a hardware problem within the network.
It turned out to be a switch on the network which had gone terribly bad and
was causing packets to be dropped, bad crc's, and just generally wrecking
hovac on the network.
So the 10053 error was an accurate error as far as the software was
concerned, I just didn't believe it and immediately suspected my software.
Again thanks for responding, it helped me zero in on the problem.
Mike
"Hans Galema" < XXXX@XXXXX.COM >wrote in message
Quote
Hans Galema wrote:

>Sorry, but that is beyond my knowledge. Could the errors be
>caused by one clientconnection only ?

If you log the 10053 error then you log the client-ip too ?
See if it is always the same one.

Hans.
 

Re:Help with socket error 10053

mike wrote:
Quote
After many, many hours of studing and tracing the problem I have determined
that it is not a software problem but a hardware problem within the network.
It turned out to be a switch on the network which had gone terribly bad and
was causing packets to be dropped, bad crc's, and just generally wrecking
hovac on the network.

So the 10053 error was an accurate error as far as the software was
concerned, I just didn't believe it and immediately suspected my software.

Again thanks for responding, it helped me zero in on the problem.
And thank you for informing us of this. It is good to know that all ended well.
Hans.