• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 735
  • Last Modified:

Socket creation error: Window handle allocation failed: Windows error #8

We have a server with 12 gb rams on it. Our application runs threads about 1500-2000. Also our stack size of main application is 1 mb.

We periodically get the error message Socket Creation Error:....

What can be the resolution for it. I definitely need gurus for the answers.

  • 2
1 Solution
depending on your windows version, you might have a maximum number of handles per process of 10.000. as you can see in this KB: http://support.microsoft.com/kb/327699
you can see if this is the case by running process explorer (from sysinternals: http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx ) and look at the number of handles and threads.

another problem can be the way you create threads. see the following blog entry on this issue: http://blogs.msdn.com/oldnewthing/archive/2005/07/29/444912.aspx
(I know you mentioned application stack, but thread stack is more important in this case :)

and obviously it also depends on what the threads are creating. you might have a socket leakage somewhere ;)
why a C grade?

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now