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

Posted on 2008-11-07
Last Modified: 2012-06-22
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.

Question by:tolgaong
    LVL 28

    Accepted 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:
    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 ;)
    LVL 28

    Expert Comment

    why a C grade?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
    Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now