Networking Forums

Networking Forums > Computer Networking > Windows Networking > .NET 2.0: WSEWOULDBLOCK socket error when sending data using synchronous sockets ?

Reply
Thread Tools Display Modes

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

 
 
Navin Mishra
Guest
Posts: n/a

 
      03-12-2007, 08:56 PM
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




 
Reply With Quote
 
 
 
 
Arkady Frenkel
Guest
Posts: n/a

 
      03-21-2007, 07:39 AM
WSEWOULDBLOCK really isn't error but warning only
Arkady
"Navin Mishra" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
>
>
>



 
Reply With Quote
 
Ben Voigt
Guest
Posts: n/a

 
      03-21-2007, 12:24 PM

"Arkady Frenkel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> 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
>>
>>
>>
>>

>
>



 
Reply With Quote
 
Arkady Frenkel
Guest
Posts: n/a

 
      03-22-2007, 07:35 AM
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> "Arkady Frenkel" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> 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
>>>
>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Navin Mishra
Guest
Posts: n/a

 
      03-22-2007, 01:19 PM
That's interesting. Doesn't SendTimeout property apply to synchronous
sockets only ? And how 21 sec = 3+6+12 was calculated ?

Thanks!

"Arkady Frenkel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>
>> "Arkady Frenkel" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> 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" <(E-Mail Removed)> wrote in message
>>> news:%(E-Mail Removed)...
>>>> 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
>>>>
>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Arkady Frenkel
Guest
Posts: n/a

 
      03-22-2007, 09:37 PM
Hi!
"Navin Mishra" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>>
>>> "Arkady Frenkel" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> 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" <(E-Mail Removed)> wrote in message
>>>> news:%(E-Mail Removed)...
>>>>> 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
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data sent through sockets are *sometimes* inverted ?!!! mast4as Linux Networking 27 02-26-2012 01:02 PM
Data sent through sockets are *sometimes* inverted ?!!! mast4as Linux Networking 0 02-17-2012 07:38 AM
Seeing large amounts of data on udp recv-q, only sending 1 byte of data ssussman@starentnetworks.com Linux Networking 3 05-25-2007 03:44 PM
Sending and reading big data by socket cyril Linux Networking 1 08-28-2003 03:58 PM



1 2 3 4 5 6 7 8 9 10 11