SharePoint 2010: Server out of memory in ULS log?

What the hell!?!?! Thats all I’ve got to say about this issue. So here’s what happened. I created a vanilla web application and it was working. I realized after a while that I forgot to set the portalsuperuseraccount and portalsuperreaderaccount properties so I set them. fast forward… I give the web app to the people that requested it and whaaa, it doesn’t work! It’s giving a correlation ID and everything. I think great I’ll just find the ULS events related to the correlation ID and get this fixed. This is what was logged:

05/23/2012 15:18:56.35 	w3wp.exe (SERVERNAME:0x2134)            	0x1D78	SharePoint Foundation         	General                       	8kh7	High	Server Out Of Memory.  There is no memory on the server to run your program. Please contact your administrator with this problem.	3afb7d29-3d00-4fff-894f-6a6d783646f7
05/23/2012 15:18:56.36 	w3wp.exe (SERVERNAME:0x2134)            	0x1D78	Web Content Management        	Publishing                    	8vzh	Unexpected	PortalSiteMapProvider was unable to fetch current node, request URL: /_layouts/settings.aspx, message: Server Out Of Memory.  There is no memory on the server to run your program. Please contact your administrator with this problem., stack trace:    at Microsoft.SharePoint.Library.SPRequestInternalClass.GetUserToken(String bstrUrl, String bstrLogin)     at Microsoft.SharePoint.Library.SPRequest.GetUserToken(String bstrUrl, String bstrLogin)     at Microsoft.SharePoint.SPWeb.GetUserToken(String userName)     at Microsoft.SharePoint.Publishing.CacheManager.<.ctor>b__0(SPSite newSite)     at Microsoft.SharePoint.Publishing.CommonUtilities.<>c__DisplayClass1.<RunWithElevatedSite>b__0()     at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()     at Microsoft....	3afb7d29-3d00-4fff-894f-6a6d783646f7
05/23/2012 15:18:56.36*	w3wp.exe (SERVERNAME:0x2134)            	0x1D78	Web Content Management        	Publishing                    	8vzh	Unexpected	...SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)     at Microsoft.SharePoint.Publishing.CommonUtilities.RunWithElevatedSite(SPSite siteNonElev, Boolean allowUnsafeUpdates, ElevatedSiteProcessor callWithElevatedSite)     at Microsoft.SharePoint.Publishing.CacheManager..ctor(SPSite site)     at Microsoft.SharePoint.Publishing.CacheManager.GetManager(SPSite site, Boolean useContextSite, Boolean allowContextSiteOptimization)     at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider.get_ObjectFactory()     at Microsoft.SharePoint.Publishing.Navigation.Por...	3afb7d29-3d00-4fff-894f-6a6d783646f7
05/23/2012 15:18:56.36*	w3wp.exe (SERVERNAME:0x2134)            	0x1D78	Web Content Management        	Publishing                    	8vzh	Unexpected	...talSiteMapProvider.get_CurrentNode()	3afb7d29-3d00-4fff-894f-6a6d783646f7
05/23/2012 15:18:56.53 	w3wp.exe (SERVERNAME:0x2134)            	0x1D78	SharePoint Foundation         	General                       	8sl1	High	DelegateControl: Exception thrown while adding control 'Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapDataSourceSwitch': Object reference not set to an instance of an object.	3afb7d29-3d00-4fff-894f-6a6d783646f7

“Server out of memory”? The WFEs in the environment have 16 GB of ram each. No way am I buying that reason. Today I remembered, this is the only web application in our farm that is setup to use windows classic authentication. I checked the portalsuperuseraccount and portalsuperreaderaccount properties and sure enough I had followed my documentation for creating a web application to the letter. Unfortunately my documentation assumes I’m creating a claims authentication based web application. DOH! I checked using:

$wa = get-spwebapplication webappURL
$wa.properties

Sure enough I had set the values of the properties to be the claim ID for the users. In other words they appeared with the i:0#.w| prefix. I ran the following to correctly set them.

$wa = Get-SPWebApplication webappURL
$wa.properties["portalsuperuseraccount"] = "domain\svcsp-cacheuser"
$wa.properties["portalsuperreaderaccount"] = "domain\svcsp-cachereader"
$wa.update()

The change should take effect right away and not cause downtime.

In retrospect the some of the text in the events do kind of lean toward the issue being something with the publishing features. However it was hard to get past the “Server out of memory” error. I’m sure that makes some kind of sense on a technical level but it’s a very vague and misleading error. I hope this helps someone.

6 thoughts on “SharePoint 2010: Server out of memory in ULS log?”

  1. Thanks! had the same issue. In my case the web app was originally claims based and I switched to classic by PowerShell. I changed the User Policy accounts to remove i:0#.w| but needed to do your step too.

  2. Wow. I can’t say how long I was searching for this answer. If I did, I’d probably get fired from my job.

    (Yes, the memory message threw me too AND all of the other searchable terms that showed up in the log and malfunctioning page.)

    Thank you, thank you, thank you!

Leave a Reply