title: Limit to Open Processes
body: <p>I've build a service that monitors a set of Forms programs built using VB .Net Framework 4. This is a multiple instance forms program where the file name gets renamed accordingly. If the forms program isn't running, the process starts the program:</p>
  
  <pre><code>Private Sub StartProcess(ByVal CommChannel As String, ByVal status As Integer)
      Dim fileName As String = ServerConfig.OpcToDbFilePath &amp; CommChannel &amp; "\" &amp; GetProcName(CommChannel)
      fileName &amp;= ".exe"
      CopyFiles(fileName, CommChannel)
      System.Threading.Thread.Sleep(200)
      Try
          If System.IO.File.Exists(fileName) Then
              Dim opcProcess As New Process
              Try
                  opcProcess.StartInfo.UseShellExecute = True
                  opcProcess.StartInfo.FileName = fileName
                  opcProcess.StartInfo.CreateNoWindow = True
                  opcProcess.Start()
                  System.Threading.Thread.Sleep(500)
              Catch ex As Exception
                  ...
              End Try
          Else
              ...
      Catch ex As Exception
          ...
          End Try
      End Try
  End Sub
  </code></pre>
  
  <p>It works great until after the 28th program starts up. After that, the forms program that I'm trying to start unexpectedly closes.</p>
  
  <p>Am I reaching some sort of limit to how many instances can be opened up? The service and Forms programs are running on Windows Server Datacenter 2012. </p>