Tech Support > Microsoft Windows > Development Resources > win2k service limitation ?
win2k service limitation ?
Posted by stef on April 1st, 2008


Hello,

Running on a win2k server, I did a tcp/ip server like in C (vc6-sp4)
which waits client connections (and does thing after but no the
problem, I think...)

If I run the server under a cmd.exe, everything works fine, I can up
to 200/300 "simultaneous" client connections.
(I'm using non-blocking select() with FD_SETSIZE set to 1024)
Perfect...
But now, If I set the server in "service mode" (with XYNTService tool
for example), I got WSAECONNRESET 100054 socket error after 165 client
entries !!

I don't have this behavior under windows-XP, windows-2003 and
windows-2008... only on windows 2000 family.

Before going deeply into code explanations, could you just tell me if
there's something "special" with socket under win2k (some kind of
console limitation !?)

Thanks for your help

Posted by stef on April 2nd, 2008


Ok, seems weird, but now in my service, if I force "SW_SHOW" to show
the console and restart, it works !!!!

what that ??

Posted by Michael Wojcik on April 7th, 2008


stef wrote:
This could be a desktop heap exhaustion issue. Non-interactive
services run with a separate, smaller desktop heap, and I believe
Win2k had a smaller service desktop heap (by default) than later
versions of Windows.

See for example:

http://blogs.msdn.com/ntdebugging/ar...-overview.aspx

Do you check all your Windows API calls to see if they fail? Your
WSAECONNRESETs probably indicate that some resource couldn't be
allocated, so you should have gotten back an invalid handle or similar
from some call.

--
Michael Wojcik



Similar Posts