tag:help.appveyor.com,2012-11-13:/discussions/questions/30255-number-of-background-processes-can-be-runAppVeyor: Discussion 2018-11-23T13:26:29Ztag:help.appveyor.com,2012-11-13:Comment/465331522018-11-22T00:16:28Z2018-11-22T00:16:28ZNumber of background processes can be run<div><p>No they are not limited. How do you count them? I recently dealt with similar problem and I created array of process objects to check. E.g. to start each process run this</p>
<pre>
<code> $process = Start-Process -FilePath 'mycommand' -ArgumentList 'arg1', 'arg2' -PassThru
$script:procs += @($process)</code>
</pre>
<p>then check number of running processes with code like this:</p>
<pre>
<code>$runningProcs = ($procs | ? {!$_.HasExited}).Count</code>
</pre>
<p>Also you can check exit code for each member of that array.</p>
<p>My suspicion is that one of those three processes fails (but not because if any threading limitations which we do not have).</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/465331522018-11-22T12:32:03Z2018-11-22T17:19:05ZNumber of background processes can be run<div><p>Ilya,</p>
<p>I was thinking the same: that one of the processes fail. I tried to run the processes seperately, but no problem.</p>
<p>In <a href="https://ci.appveyor.com/project/double-beep/asmfish-i5x4k/build/job/5pdlosqsvcubv5rd">this</a> build, I tried to run processes one-by-one instead of previous builds (running process of a file which started all of the 26 required processes), but to start all of these processes lasted ~3-4 minutes. Why this?</p>
<p>@IlyaFinkelshteyn <a href="https://ci.appveyor.com/project/double-beep/asmfish-i5x4k/builds/20493859/job/uw63ocalmm0dep5q#L44">tried</a> your way, variable <code>runningProcs</code> gives 0. Have I done something wrong?</p></div>doublebeep7tag:help.appveyor.com,2012-11-13:Comment/465331522018-11-23T00:29:25Z2018-11-23T00:29:25ZNumber of background processes can be run<div><p>You did not set a <code>PassThru</code> parameter. Also you can <a href="https://www.appveyor.com/docs/how-to/rdp-to-build-worker/">RDP</a> and run the thing manually and see what happens.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/465331522018-11-23T12:47:38Z2018-11-23T12:47:38ZNumber of background processes can be run<div><p>@Ilya,</p>
<p>check <a href="https://ci.appveyor.com/project/double-beep/asmfish-i5x4k/builds/20508362/job/xii9ccggph3d9qeq">https://ci.appveyor.com/project/double-beep/asmfish-i5x4k/builds/20...</a> and <a href="https://ci.appveyor.com/project/double-beep/asmfish-i5x4k/builds/20508364/job/801gohrqa24mmnsb">https://ci.appveyor.com/project/double-beep/asmfish-i5x4k/builds/20...</a> . I think that some processes end (as they last ~30secs) during all of these <code>Start-Process</code> commands.</p>
<p>But why to start 26 processes requires ~5mins? They had to start immediately (~1sec per process).</p>
<p>I didn't understand this with <code>RDP</code> you said. Where should I connect?</p></div>doublebeep7tag:help.appveyor.com,2012-11-13:Comment/465331522018-11-23T13:19:43Z2018-11-23T13:19:43ZNumber of background processes can be run<div><p>Regarding RDP, please follow the link I sent in previous message. Regarding process start speed, I believe that it is because of number of cores on VM, which has two of them. I think the same happens much faster on your dev box simpler because it is much beefier than build VM. Does this start time prevents you from implementing your scenario, or you just do not like the speed?</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/465331522018-11-23T13:26:23Z2018-11-23T13:26:23ZNumber of background processes can be run<div><p>No worrries, this doesn't prevent me from my project, I would like to make build time shorter.</p></div>doublebeep7