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
- In sufficient system (Web/App) memory
- No sufficient memory allocation to IIS
- Other processes consuming memory
To resolve these errors,
- Monitor Memory perf counters. If system using all the available memory during load test, then consider upgrading Memory of the web/app machines
- Increase the duration between performance counter collection
- Check any other services that are maximizing memory utilization
- Optimize memory usage for IIS