private void ProcessOnProcessStateUpdated(object sender, EventArgs e) { var process = sender as VstHostProcess; Debug.WriteLine("processstate is now " + process.CurrentProcessState); if (process.CurrentProcessState == ProcessState.EXITED && !process.StartupSuccessful && PoolRunning) { _failedStartupProcesses++; if (_failedStartupProcesses > 5 && (double)_failedStartupProcesses / _totalStartedProcesses > 0.1) { StopPool(); var eventArgs = new PoolFailedEventArgs { ShutdownReason = "The VST worker pool has been stopped because: " + Environment.NewLine + Environment.NewLine + "More than 10% of all VST process workers failed to startup. Check the logs for each failed " + " worker (Tab 'VST Workers') and increase the startup time in the settings if necessary. " + Environment.NewLine + Environment.NewLine + "Re-start your pool after investigation and configuration." }; PoolFailed?.Invoke(this, eventArgs); } } }
private void NewProcessPoolOnPoolFailed(object sender, PoolFailedEventArgs e) { _messageService.ShowErrorAsync(e.ShutdownReason, "VST worker pool failed", HelpLinks.CONCEPTS_VST_WORKER_POOL); }