I have a signalr server which is hosted in IIS. There is a function in the hub which starts 600 processes in windows and then kills them.
//start 600 processes
for (int i = 0; i < 600; i++)
{
try
{
Process myProcess = Process.Start(startInfo);
proclist.Add(myProcess);
Task.Delay(10).Wait();
}
catch(Exception e)
{
feedback = "Process " + i + " cannot be started: " + e.Message;
break;
}
feedback = "All processes are running.";
}
//kill them
foreach (var proc in proclist)
{
try
{
proc.Kill();
Task.Delay(10).Wait();
}
catch (Exception e)
{
feedback = "Process " + proclist.IndexOf(proc) + " cannot be killed: " + e.Message;
break;
}
feedback = "All Processes are killed.";
}
However, when I call this function in Client I get an Exception whiling killing the processes:
Process 104 cannot be killed: Die Anforderung kann nicht verarbeitet werden, da der Prozess beendet wurde(The request cannot be proceeded, because the process is already terminated.)
It seems that I can only keep 104 processes runing. And the rest of them terminate immediately after start.
- I tried the same thing in a Console Application, and all processes can be started and killed.
- I tried to consume a lot of memory using another application and I could also keep 104 processes running.
- I tried to consume a lot of memory using another application and I could also keep 104 processes running.
- I also checked all possible IIS configuration and I could not find any settings which is related to this issue.
So I would like to ask whether anyone knows how to start more procecces in an ASP.NET application.
I will appreciate it very much if someone can help me. Thanks!