Request time out is a very generic issue and can happen due to numerous reasons but error PortalSiteMapProvider was unable to fetch children for node can occur only if site navigation nodes cannot be fetched that is Top Navigation or Left Navigation.
Issue Symptoms: SharePoint sites does not load at all and give error after more than a minute. If you look for error message via correlation ID you will see Request time out message and below error messages
- PortalSiteMapProvider was unable to fetch children for node
- Caught a thread abort exception in TemplateRedirectionPage.ProcessRequest, the exception may be expected
- Unexpected System.Web.HttpException: Request timed out
Issue Analysis: The first error is the key here as it mentions that it has experienced issue while fetching Navigation from site. This issue can be triggered if you duplicate nodes in site collection or between multiple site collections in the same content database. It’s important to understand that this can happen in the same content database site collections. You can consider this is as a kind of bug in SharePoint because this scenario is valid to have duplicate nodes. To identify and confirm that you have this issue you need to fire below SQL query on the content database you have the issue. I know I know we should fire any queries in SharePoint database but in this case you have to and got in confirmed from Microsoft, also they mention that it is prohibited to update data.
SELECT TOP(20) Count(nav.Eid) AS ‘DuplicateCount’, nav.DocId, ad.Dirname, ad.Leafname FROM NavNodes AS nav with(nolock) INNER JOIN AllDocs AS ad with(nolock) ON nav.Docid = ad.Id WHERE (nav.EidParent = 1025 OR nav.Eidparent = 1002) AND DocID IS NOT NULL GROUP BY nav.DocId, ad.DirName, ad.LeafName ORDER BY ‘DuplicateCount’ DESC
If it has data then it means you have duplicate nodes issue. A lot of users in some other articles have mentioned that they somehow were able to find numerous nodes and they fixed it by deleting the nodes which were basically junk nodes not added by them. But in our case we did not have any junk nodes but it occurred due to real nodes.
Once above is confirmed we need to find out which stored procedure failed as that it will re-confirm above and also what fix we need to do. To do that we need to change verbose level of logging and capture more detailed log. To change verbose use below commands to start and stop it. Between them you need to perform the issue that is load the page
set-sploglevel -traceseverity verboseex
Clear-SPLogLevel
Based on correlation ID you should see that this stored procedure “sp_recompile proc_getwebnavstruct” is the culprit. If this is also confirmed then we can go for the fix
Issue fix: To fix the issue you will have to do things, first is it to update statistics table and second free cache of stored procedure. Note that statistics update is only needed if it has not been updated to check that fire below query on content database
USE WSS_Content_name
GO
SELECT name AS index_name,
STATS_DATE(OBJECT_ID, index_id) AS StatsUpdated FROM sys.indexes order by’index_name’ ASC
GO
If the row Nav_Nodes does not have dates same as today then please update it using below command
EXEC sp_MSforeachtable ‘UPDATE STATISTICS ? WITH FULLSCAN’
Once done we should also run below command to update query plan cache
DBCC FREEPROCCACHE
Once done site should load normally now as it use to do before.
Note that the fix is all about running SQL queries on SharePoint content database, it has to be done carefully and also only if needed.
Refer to below support link for details
https://support.microsoft.com/en-us/help/3103194/outdated-database-statistics-decrease-sharepoint-server-performance,-cause-time-outs,-and-generate-run-time-errors
In case you need more help on this or other SharePoint issues please contact us via our Contact Us page or via our Facebook page or via Twitter
Like us on Facebook and follow us on Twitter