远程桌面服务器(2012)上的Firefox实例最多需要30GB内存/用户

我只在会话集合中设置了5个运行远程桌面服务的Windows Server 2012 R2 Standard服务器。

我装上的最新服务器有96GB的内存和80-160个用户。 所有的用户只是简单地通过Firefox访问networking。

每天,我都会有一到三个用户的firefox实例,每天最多消耗30GB(!!!!!)的内存。 在检查他们的交通时,通常是:

  • YouTube的
  • 音乐stream媒体
  • 任何Flash内容

大多数用户只有1或2个选项卡打开。 看来Flash是罪魁祸首。

我已经将Flash完全更新到最新版本,并且Firefox正在运行最新版本。 所有的操作系​​统更新也已完成。

为什么会发生这种情况/我该如何遏制这种情况? 我不能让3个用户占用所有的服务器资源。

我把这个暂时“处理”放在一个根本不是处理的问题上。 我仍然绝对寻找问题的实际来源。


临时处理

我build立了一个在chron上运行的Powershell脚本,它发现所有的firefox实例都运行了大量的内存,向用户发送消息,然后终止进程。

foreach ($comp in $args) { $size = 4000000000 $owners = Get-WmiObject -ComputerName $comp -Query "Select * from Win32_Process where WorkingSetSize > $size and name = 'firefox.exe'" | Select @{Label='Owner';Expression={$_.GetOwner().User}} foreach ($i in $owners) { $is = $i.Owner $msg = 'AUTOMATED MESSAGE: Your web browser was using an excessive amount of memory and has been closed to prevent it from overloading the server. You can open it again right after this.' $cmd = "msg.exe $is /SERVER:$comp '$msg' " Invoke-Expression $cmd } Invoke-Command -ComputerName $comp {Get-Process | Where {($_.Name -eq "firefox") -and ($_.WorkingSet64 -gt 4000000000)} | Stop-Process -Force } } 

调用:

 .\kill.ps1 ts1 ts2 ts3 ts4 ts5