Re: WSAENOBUFS on winsock client application



I think that the problem is connected with low resources issue (of course, I
may be wrong). Does your code make any big memory allocations? Did you
estimate memory usage of your process when it is heavily overloaded by
requests from clients?

You wrote previously that you have 40 threads. What is the default stack
size of thread? I remember, someone here were asking a question: "why do I
get WSAENOBUFS error when the stack size of my thread is ~860 MB" :) . The
problem is that the stack is allocated in a heap for a given process; and
the virtual memory usage is limited to 2 GB. So if you have many threads
with a big stack size the low resources issue comes. You can do the
following at the beginning to clarify my assumptions,

1) Make tests and see memory usage of your process; and if the mem
usage is big, redesign application

2) Increase address space of a process by using /3GB switch and see if
the problem remains


--
V.
This posting is provided "AS IS" with no warranties, and confers no
rights.
"FriedhelmEichin" <FriedhelmEichin@xxxxxxxxxxxxxxxx> wrote in message
news:BEA93BFB-9325-480F-B41B-BFA9AAB4F42A@xxxxxxxxxxxxxxxx
The application is running on Windows XP SP2.

The error code is returned if a preceeding connection has been broken
caused
by network issues and a new connection attempt is made within the thread.
But
this is not deterministic, normally the following connection attempt
succeeds. It may happen after a few disconnects after minutes or even
days...

--
best regards
friedhelm


"Volodymyr M. Shcherbyna" wrote:

I analyzed winsock sources (XP SP2), and the error WSAENOBUFS is returned
usually when allocation of memory failes (RtlHeapAllocate(...)) or
equivalents:

What is your OS?

--
V.
This posting is provided "AS IS" with no warranties, and confers no
rights.
"FriedhelmEichin" <FriedhelmEichin@xxxxxxxxxxxxxxxx> wrote in message
news:FB4F7278-628C-4AF1-A22A-278509CE667B@xxxxxxxxxxxxxxxx



.



Relevant Pages

  • Re: Question on Garbage Collection
    ... the memory usage for the .NET process spikes up ... it has counters specifically for .NET allocations and collections. ...
    (microsoft.public.dotnet.framework.performance)
  • Re: Memory not being released
    ... >of memory usage even though I'm sure the memory is being ... When I then minimize it memory usage goes to ... investigate writing your own memory manager, using VirtualAlloc() and ... VirtualFreefor large allocations, ...
    (microsoft.public.vc.language)
  • RE: 2003 SBS stalling randomly
    ... A memory leak occurs in an application using the Volume Shadow Copy Service ... Poolmon displays data that the ... The data is grouped by pool allocation tag. ... Press P twice to display allocations from only the paged pool. ...
    (microsoft.public.windows.server.sbs)
  • Re: xmalloc string functions
    ... than a NULL return from malloc(). ... pointer value to null at the point I want to trigger the failure. ... I've also had VMWare report out-of-resource at times when the only resource that was tight was memory, and again it gave me the chance to recover the situation which saved me significant work because I had two VMs running and the state between them was important and took time setting up. ... allocations without reference to other circumstances (number of ...
    (comp.lang.c)
  • Re: System pretends to be out of memory when it isnt
    ... With 1Gb of memory I can usually copy dozens of photos ... >>> to analyze Windows heap allocations for a specific process. ... >>> discusses how you can use UMDH to help locate memory leak problems. ... the maximum stack trace depth is 16. ...
    (microsoft.public.windowsxp.general)