Jaa


Resolve “Out of Memory exception“ in VSTS Web/ Load test

How to resolve error “Out of Memory exception“ in VSTS Web/ Load test?

 I had experienced this problem in following scenarios

Case1: My load test continuous to run but tests fails with “Out of Memory exception“ in test log

Case2: After few minutes of test run it throws error, even though you have sufficient free memory

Case3: Test completes but fails with “Out of Memory exception” returned by webserver

Above 1 & 2 cases I had solved problems by changing settings as below

 Set Agent to run on 64 bit process if the Agent is a 64 bit machine. You need to do this setting in Test Controller

Test--> Edit Test Settings--> Hosts --> Run tests in 32 bit or 64 bit process --> Run tests in 64 bit process on 64 bit machine

 Case3 can happen in variety of scenarios

  1. In sufficient system (Web/App) memory
  2. No sufficient memory allocation to IIS
  3. Other processes consuming memory

To resolve these errors,

  1. Monitor Memory perf counters. If system using all the available memory during load test, then consider upgrading Memory of the web/app machines
  2. Increase the duration between performance counter collection
  3. Check any other services that are maximizing memory utilization
  4. Optimize memory usage for IIS