| Dart Home | PowerTCP Sockets for .NET | Custom Development | Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums |
| Author | Forum: PowerTCP Sockets for .NET (Secure and Standard) Topic: Send method blocks forever ??? |
| fonager From: Copenhagen, Denmark Posts: 25 Member Since: 11/18/03 |
posted December 2, 2003 6:51 AM In my test application, I sometimes during VERY heavy stress testing, experiences that a call to the "TCP.Send()" method blocks forever ? I know that "TCP.Send()" is a blocking call, but is it possible that a situation can arise where a call to "TCP.Send()" never return, which equals blocking the thread forever ??? When I stress my app on my local LAN, I cannot reproduce this problem, but when I use a test environment, where it is "real users" from different places on the internet which connects, this problem arises. Sometimes it arises after 2 hours, sometimes af 20 hours. But my logfiles shows 100% FOR SURE, that the program stops at the "TCP.Send()" line, and never continues program execution ... |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted December 2, 2003 8:48 AM That should not be possible. If you figure out a way to reliably duplicate the problem, please let us know. |
| fonager From: Copenhagen, Denmark Posts: 25 Member Since: 11/18/03 |
posted December 2, 2003 9:04 AM I can then tell you that I HAVE DUPLICATED the problem, and that the "TCP.Send()" call blocks forever then. If the server accepts a connection from a client, and then starts sending data back to the client, and then client stops reading this incoming data (because the client for some reason cannot read the incoming data - a deadend loop or something like that has happend in the client), ... ... then the server thread that executes "TCP.Send()" will hang, as the "TCP.Send()" call blocks (forever!) after a few calls. That is - the first 8-10 times it calls "TCP.Send()", the function returns shortly, but after this, the call blocks forever, causing the app to stop working. (Depending on the network setup and buffers setup.) Isnt there some kind of timeout on the "TCP.Send()" function ? I mean, I know it is a blocking call, but I find it very disturbing that the call can block forever! |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted December 2, 2003 9:19 AM Yes, there is a send timeout. Perhaps you have it set to 0? If not, try setting it to 5000. If you are still having the problem, please make a very simple test app that demos the problem and send it to support@dart.com. |
| fonager From: Copenhagen, Denmark Posts: 25 Member Since: 11/18/03 |
posted December 3, 2003 6:02 PM I have not set the timeout to 0 in my application, but isnt it 0 as a default ? Becuase that can explain why the program tries "forever" to send the data thru the socket ??? |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted December 3, 2003 7:22 PM What happened when you set it to 5000? |
| fonager From: Copenhagen, Denmark Posts: 25 Member Since: 11/18/03 |
posted December 4, 2003 3:52 AM I have not tried that, as I (after I started this thread), changed the code so I used "BeginSend()" instead of "Send()". |
| Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|