Re: WSAENOBUFS on winsock client application
- From: "Volodymyr M. Shcherbyna" <v_scherbina@xxxxxxxxxxxxxxx>
- Date: Fri, 9 May 2008 11:30:29 +0200
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
.
- Follow-Ups:
- Re: WSAENOBUFS on winsock client application
- From: Len Holgate
- Re: WSAENOBUFS on winsock client application
- From: FriedhelmEichin
- Re: WSAENOBUFS on winsock client application
- References:
- WSAENOBUFS on winsock client application
- From: FriedhelmEichin
- Re: WSAENOBUFS on winsock client application
- From: Volodymyr M. Shcherbyna
- Re: WSAENOBUFS on winsock client application
- From: FriedhelmEichin
- WSAENOBUFS on winsock client application
- Prev by Date: Re: WSAENOBUFS on winsock client application
- Next by Date: loopback address 127.0.0.1 question
- Previous by thread: Re: WSAENOBUFS on winsock client application
- Next by thread: Re: WSAENOBUFS on winsock client application
- Index(es):
Relevant Pages
|
|