Created
January 27, 2012 11:16
-
-
Save awithy/1688334 to your computer and use it in GitHub Desktop.
WorkingSetMemoryIssues
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var workingSet = Environment.WorkingSet; | |
if (workingSet >= RecycleThresholdBytes) | |
{ | |
Logger.TraceWarning("Maximum working set exceeded (" + workingSet + "). Role shall now be recycled."); | |
RoleEnvironment.RequestRecycle(); | |
} | |
else if(workingSet >= WarningThresholdBytes) | |
{ | |
ErrorSink.Error("The worker role process has an elevated working set (" + workingSet + ")."); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment