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.

Who is Participating?
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:
you can see if this is the case by running process explorer (from sysinternals: ) 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:
(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?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.