Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / April 2005

Tip: Looking for answers? Try searching our database.

MVP please help - WSAENOBUFS problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Valerie Hough - 14 Apr 2005 15:20 GMT
Hi,
My application uses System.Net.Sockets.Socket class (asynchronously) to
implement record sharing. There is a central task that accepts two way
connections from multiple clients. There are usually 20-30 sockets open at a
given time, but possibly as may as 50-60. As the client uses the software,
it usually works fine for several hours, then slows down and eventually
generates a WSAENOBUFS error (An operation on a socket could not be
performed because the system lacked sufficient buffer space or because a
queue was full.) Pertinent information:

0) WSAENOBUFS is always reported by client task and never server task.

1) When a client shuts down, it does:
       Socket.Shutdown( SocketShutdown.Both );
       Socket.Close();

2) Sockets are opened by client and kept open for the life of the client.

3) Messages sent back and forth are always quite small, usually 40-160
bytes. An average of 40-50 messages in total per minute are sent at peak
usage.

4) Maximum number of connecting tasks ranges from 4-25 or so.

5) Server task is always OK.

This feels like a resource leak of some sort on the client side, but it
seems as though the code is as per the documentation.

Can anyone suggest what might be wrong or think of further investigation to
undertake?

Thanks in advance.
Brian Hough
recoil@community.nospam - 14 Apr 2005 15:51 GMT
Have you tried disposing of your socket , set a timeout for say 15
seconds and making a brand new socket and try reconnecting.

Another question might be, how big is the buffer that you are providing
for receiving data. I generally set mine to 1k or 1.5k. Generally
1.2-1.5k is usually the largest a single packet will ever get.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.