同时启动应用程序池会导致与最大并发shell数相关的错误

时间:2015-03-09 12:34:44

标签: shell powershell concurrency

我有一个powershell脚本,它可以异步运行以启动多个应用程序池。

但是当我有一定数量的应用程序池启动它时会抛出以下错误:

  

由于首选项变量,运行命令已停止   " ErrorActionPreference"或公共参数设置为停止:[ServerX]   连接到远程服务器XXX失败,出现以下错误   message:WS-Management服务无法处理请求。这个   用户已超过允许的最大并发shell数   这个插件。关闭至少一个打开的shell或提高插件配额   对于这个用户。有关更多信息,请参阅   about_Remote_Troubleshooting帮助主题。

每位用户的最大shell数为10000。

当appcmd运行时,似乎有更多的事情发生在引擎盖下但不确定我如何解决这个问题

任何建议都会很棒

以下是winrs config

Type            Name                           SourceOfValue   Value
----            ----                           -------------   -----
System.String   AllowRemoteShellAccess                         true
System.String   IdleTimeout                                    7200000
System.String   MaxConcurrentUsers                             10
System.String   MaxShellRunTime                                2147483647
System.String   MaxProcessesPerShell                           25
System.String   MaxMemoryPerShellMB                            1024
System.String   MaxShellsPerUser                               10000

1 个答案:

答案 0 :(得分:2)

cd WSMan:\localhost\Shell
Set-Item .\MaxProcessesPerShell 10000