WSAStartup failed with error 10107 only on Windows server 2016 with 2 CPU's

M

M Hoang

I have a main server program that spawns a lot of child processes that use socket communication (winsock 2.2)
After running for 40min-60min, some child process will abort, WSAStartup failed with error 10107.
The program only fails when running on Windows Server 2016 with 2 CPU's, 8GB memory.
(did not fail on Windows Server 2016 with 1 CPU, 4GB memory).
Would like to know what is causing the problem, and how to fix it.

Thank you.
Minh.

Program running by child process:

int main( int argc, char ** argv )
{

WORD wVersionRequested;
WSADATA wsaData;
int wsaerr;

wVersionRequested = MAKEWORD(2, 2);

/* Initialize winsock */
if ((wsaerr = WSAStartup(wVersionRequested, &wsaData)) != 0)
{
printf( "WSAStartup failed with error: %d\n", wsaerr);
exit(1);
}

.........

WSACleanup();
exit(0);

} // Main

Continue reading...
 
Back
Top Bottom