IndexOutOfRangeException in SamSaffron\MiniProfiler
We have our website running on Umbraco(Version 7.13.1 assembly: 1.0.6949.28284), without any issues, for quite sometime now.
Yesterday suddenly one of the 3 production servers started throwing 500 for every request -
Exception information:
Exception type: ModelBindingException
Exception message: Cannot bind source content type Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedContent to model content type Umbraco.Web.PublishedContentModels.Landing. The view model is a ModelsBuilder type, but the source is not. The application is in an unstable state and should be restarted.
at Umbraco.Web.Mvc.RenderModelBinder.ThrowModelBindingException(Boolean sourceContent, Boolean modelContent, Type sourceType, Type modelType)…
When we drilled down the issue, we found that it started after following exception -
Exception information:
Exception type: IndexOutOfRangeException
Exception message: Index was outside the bounds of the array.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at StackExchange.Profiling.MiniProfiler.AddSqlTiming(SqlTiming stats) in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling\MiniProfiler.IDbProfiler.cs:line 94
at StackExchange.Profiling.SqlTiming..ctor(IDbCommand command, ExecuteType type, MiniProfiler profiler) in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling\SqlTiming.cs:line 72
Resetting AppPool fixed the issue, however, we were not able to figure out what caused it. There were no changes made on the server, no OS patches, updates or anything.
Could anyone please shed some light on what might have caused it?
This issue generally happens when database tends to grow and SQL have timeouts. This sometimes causes umbracoconfig.xml to get corrupt.
-- If plugin urlTracker installed
Select count(*) From icurlTracker
-- Create a temporary table for all documents which are published and not in the recycle bin
CREATE TABLE #Nodes (id int)
GO
-- Delete all rows if the table exists before
TRUNCATE TABLE #Nodes
GO
-- Insert all nodeIds from all documents which are published and not in the recycle bin
INSERT INTO #Nodes
SELECT N.id
FROM umbracoNode N
INNER JOIN cmsDocument D ON N.ID = D.NodeId
WHERE nodeObjectType = 'C66BA18E-EAF3-4CFF-8A22-41B16D66A972'
AND [path] NOT LIKE '%-20%'
AND D.Published = 1
GO
-- Create a temporary table for all versionId's to delete
CREATE TABLE #Versions (id UniqueIdentifier)
GO
-- Delete all rows if it exists before
TRUNCATE TABLE #Versions
GO
-- Insert all versionId's from all nodeIds in the #Nodes table
-- and where published is set to false and newest is set to false
INSERT INTO #Versions
SELECT versionId
FROM cmsDocument
WHERE nodeId IN (SELECT id FROM #Nodes) AND published = 0 AND newest = 0
GO
Select count(*) FROM cmsPreviewXml WHERE versionId IN (SELECT id FROM #Versions)
GO
Select count(*) cmsPropertyData WHERE VersionId IN (SELECT id FROM #Versions)
GO
Select count(*) cmsContentVersion WHERE VersionId IN (SELECT id FROM #Versions)
GO
Select count(*) cmsDocument WHERE VersionId IN (SELECT id FROM #Versions)
GO
Thanks Shaishav, however, I doubt this is the issue coz we have a load balanced environment (sharing single DB) and the issue happened in only one server rest two are working fine.
Also we stripped all the versions before deployment so the DB size is pretty small.
IndexOutOfRangeException in SamSaffron\MiniProfiler
We have our website running on Umbraco(Version 7.13.1 assembly: 1.0.6949.28284), without any issues, for quite sometime now. Yesterday suddenly one of the 3 production servers started throwing 500 for every request -
When we drilled down the issue, we found that it started after following exception -
Resetting AppPool fixed the issue, however, we were not able to figure out what caused it. There were no changes made on the server, no OS patches, updates or anything.
Could anyone please shed some light on what might have caused it?
Hi Gaurav,
This issue generally happens when database tends to grow and SQL have timeouts. This sometimes causes umbracoconfig.xml to get corrupt.
Please review and let me know how it goes.
Cheers,
Shaishav
Thanks Shaishav, however, I doubt this is the issue coz we have a load balanced environment (sharing single DB) and the issue happened in only one server rest two are working fine.
Also we stripped all the versions before deployment so the DB size is pretty small.
Hello Gaurav
is there any documentation about your plugin FileSync ? im getting some errors in sync files ! ...
thank you
Angelo
Hey Angelo,
Thanks for using FileSync. I would love to help if you could share screenshot of errors you are receiving.
Also, it'd be great if you could please create a new thread and tag me or post url here.
Thanks, Gaurav
Hello Gauruv here is the screenshots and thank you for your response !
https://www.dropbox.com/s/ruukw2p5gpm37c6/Screenshot%202021-02-20%2016.12.01.png?dl=0
https://www.dropbox.com/s/687w9rf2e62v7ri/Screenshot%202021-02-20%2016.11.56.png?dl=0
https://www.dropbox.com/s/lr08rjg84rkkxey/Screenshot%202021-02-20%2016.11.49.png?dl=0
https://www.dropbox.com/s/rggpvjnmwcdlscy/Screenshot%202021-02-20%2016.11.04.png?dl=0
i Will also create a new thread !
https://our.umbraco.com/forum/using-umbraco-and-getting-started//105151-errors-in-filesync
is working on a reply...