當使用Visual Studio 2010 Test Agent 進行 Load Test 時 出現 Out of Memory 錯誤時應該如何處理

  • 2138
  • 0
  • 2011-11-29

摘要:當使用Visual Studio 2010 Test Agent 進行 Load Test 時 出現 Out of Memory 錯誤時應該如何處理

當使用 Test Agent 進行 Load Test 時 出現 Out of Memory 錯誤時

主要原因為Test Agent 的執行程式 QTAgent.exe 預設是在32位元模式執行

最大邏輯記憶體為2GB 當虛擬使用者增加到接近1000人以上時

2GB的記憶體會耗盡 產生 Out of Memory 錯誤

解決方式為雙擊 測試專案的 .testsetting 檔

選擇"主機"選項中的 "在64位元電腦上的64位元處理序中執行測試"

切換到64位元模式

如下圖

這樣就可以避免在模擬大量虛擬使用者時 出現 Out of Memory 錯誤

參考資料:

http://blogs.msdn.com/b/mahipalkante/archive/2010/06/10/visual-studio-2010-load-test-out-of-memory-exceptions-on-32-bit-machines-or-32-but-run.aspx

風來疏竹,風過而竹不留聲;雁度寒潭,雁去而潭不留影。故君子事來而心始現,事去而心隨空。