473,396 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

.NET 2.0: WSEWOULDBLOCK socket error when sending data using synchronous sockets ?

Hi,

In load test of our .NET 2.0 socket application on Win2003 server, we are
seeing sometimes
WSEWOULDBLOCK error when sending data to clients. We are using synchronoous
scokets with SendTimout of 2 secs. Is it normal ?

Thanks in advance and regards

Navin


Mar 12 '07 #1
5 1808
WSEWOULDBLOCK really isn't error but warning only
Arkady
"Navin Mishra" <na**********@siemens.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Hi,

In load test of our .NET 2.0 socket application on Win2003 server, we
are seeing sometimes
WSEWOULDBLOCK error when sending data to clients. We are using
synchronoous scokets with SendTimout of 2 secs. Is it normal ?

Thanks in advance and regards

Navin


Mar 21 '07 #2

"Arkady Frenkel" <ar*****@hotmailxdotx.comwrote in message
news:uw**************@TK2MSFTNGP02.phx.gbl...
WSEWOULDBLOCK really isn't error but warning only
For a synchronous socket, it's an error. It means that the kernel refused
to buffer the data, the request was denied. The application can perform its
own buffering and hide the problem, but that's probably not a good idea,
because kernel buffer reaching capacity usually indicates poor network
connectivity, and the app could just end up allocating all available memory
for additional buffers.
Arkady
"Navin Mishra" <na**********@siemens.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>Hi,

In load test of our .NET 2.0 socket application on Win2003 server, we
are seeing sometimes
WSEWOULDBLOCK error when sending data to clients. We are using
synchronoous scokets with SendTimout of 2 secs. Is it normal ?

Thanks in advance and regards

Navin



Mar 21 '07 #3
As I see , the socket used as async, because TO of 2 sec is much less than
default for the case ( 21 sec = 3+6+12)
Arkady

"Ben Voigt" <rb*@nospam.nospamwrote in message
news:uD**************@TK2MSFTNGP03.phx.gbl...
>
"Arkady Frenkel" <ar*****@hotmailxdotx.comwrote in message
news:uw**************@TK2MSFTNGP02.phx.gbl...
>WSEWOULDBLOCK really isn't error but warning only

For a synchronous socket, it's an error. It means that the kernel refused
to buffer the data, the request was denied. The application can perform
its own buffering and hide the problem, but that's probably not a good
idea, because kernel buffer reaching capacity usually indicates poor
network connectivity, and the app could just end up allocating all
available memory for additional buffers.
>Arkady
"Navin Mishra" <na**********@siemens.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>>Hi,

In load test of our .NET 2.0 socket application on Win2003 server, we
are seeing sometimes
WSEWOULDBLOCK error when sending data to clients. We are using
synchronoous scokets with SendTimout of 2 secs. Is it normal ?

Thanks in advance and regards

Navin




Mar 22 '07 #4
That's interesting. Doesn't SendTimeout property apply to synchronous
sockets only ? And how 21 sec = 3+6+12 was calculated ?

Thanks!

"Arkady Frenkel" <ar*****@hotmailxdotx.comwrote in message
news:eG**************@TK2MSFTNGP02.phx.gbl...
As I see , the socket used as async, because TO of 2 sec is much less than
default for the case ( 21 sec = 3+6+12)
Arkady

"Ben Voigt" <rb*@nospam.nospamwrote in message
news:uD**************@TK2MSFTNGP03.phx.gbl...
>>
"Arkady Frenkel" <ar*****@hotmailxdotx.comwrote in message
news:uw**************@TK2MSFTNGP02.phx.gbl...
>>WSEWOULDBLOCK really isn't error but warning only

For a synchronous socket, it's an error. It means that the kernel
refused to buffer the data, the request was denied. The application can
perform its own buffering and hide the problem, but that's probably not a
good idea, because kernel buffer reaching capacity usually indicates poor
network connectivity, and the app could just end up allocating all
available memory for additional buffers.
>>Arkady
"Navin Mishra" <na**********@siemens.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl.. .
Hi,

In load test of our .NET 2.0 socket application on Win2003 server, we
are seeing sometimes
WSEWOULDBLOCK error when sending data to clients. We are using
synchronoous scokets with SendTimout of 2 secs. Is it normal ?

Thanks in advance and regards

Navin




Mar 22 '07 #5
Hi!
"Navin Mishra" <na**********@siemens.comwrote in message
news:eL**************@TK2MSFTNGP06.phx.gbl...
That's interesting. Doesn't SendTimeout property apply to synchronous
sockets only ?
Yes, but that's the point , operation failed on the first time ( or during
first time ) , because of short TO maybe treated as async ( instead of TO
return code you receive WSEWOULDBLOCK ). But that is my proposition only

And how 21 sec = 3+6+12 was calculated ?

There is two registry keys used :
TcpInitialRtt ( 3s by default ) and really that much more because
TcpMaxConnectRetransmissions is 2 ( forW2K/ XP/Vista machines, before was 3,
so connection time is equal to 21 sec for W2K/XP/Vista and 45 for NT),
TcpMaxDataRetransmissions equal to 5 , so real value for send is
3+6+12+24+48+96 = 3min15 sec

Arkady
>
Thanks!

"Arkady Frenkel" <ar*****@hotmailxdotx.comwrote in message
news:eG**************@TK2MSFTNGP02.phx.gbl...
>As I see , the socket used as async, because TO of 2 sec is much less
than
default for the case ( 21 sec = 3+6+12)
Arkady

"Ben Voigt" <rb*@nospam.nospamwrote in message
news:uD**************@TK2MSFTNGP03.phx.gbl...
>>>
"Arkady Frenkel" <ar*****@hotmailxdotx.comwrote in message
news:uw**************@TK2MSFTNGP02.phx.gbl...
WSEWOULDBLOCK really isn't error but warning only

For a synchronous socket, it's an error. It means that the kernel
refused to buffer the data, the request was denied. The application can
perform its own buffering and hide the problem, but that's probably not
a good idea, because kernel buffer reaching capacity usually indicates
poor network connectivity, and the app could just end up allocating all
available memory for additional buffers.

Arkady
"Navin Mishra" <na**********@siemens.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl. ..
Hi,
>
In load test of our .NET 2.0 socket application on Win2003 server,
we are seeing sometimes
WSEWOULDBLOCK error when sending data to clients. We are using
synchronoous scokets with SendTimout of 2 secs. Is it normal ?
>
Thanks in advance and regards
>
Navin
>
>
>
>




Mar 22 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Robert A. van Ginkel | last post by:
In news:OZ0W9RsdDHA.2432@TK2MSFTNGP10.phx.gbl... I ask the question how I can see if all the data is on the other side of the connection. I got as answer that I should use the blocking property. I...
1
by: Amadej | last post by:
Hello everyone, I'm having some odd problems with a little program I wrote for sending/receiving bytes across the network. I am using synchronous sockets, and it seems that when I send byte...
13
by: coloradowebdev | last post by:
i am working on basically a proxy server that handles requests via remoting from clients and executes transactions against a third-party server via TCP. the remoting site works like a champ. my...
9
by: Macca | last post by:
Hi, I have a synchronous socket server which my app uses to read data from clients. To test this I have a simulated client that sends 100 byte packets. I have set up the socket server so...
2
by: djc | last post by:
I read a network programming book (based on framework 1.1) which indicated that you should 'never' use the RecieveTimeout or the SendTimeout 'socket options' on TCP sockets or you may loose data. I...
11
by: hazz | last post by:
smtpClient.Send(message) is causing me problems as per specifics in the trace below. Email is sent but not without this error typically upon sending the second email, but sometimes when running...
10
by: David | last post by:
I have googled to no avail on getting specifically what I'm looking for. I have found plenty of full blown apps that implement some type of file transfer but what I'm specifcally looking for is an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.