Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Gaurav Mathur 10 posts 100 karma points
    Aug 30, 2019 @ 13:05
    Gaurav Mathur
    0

    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?

  • Shaishav Karnani from digitallymedia.com 348 posts 1630 karma points
    Aug 30, 2019 @ 13:24
    Shaishav Karnani from digitallymedia.com
    0

    Hi Gaurav,

    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
    

    Please review and let me know how it goes.

    Cheers,

    Shaishav

  • Gaurav Mathur 10 posts 100 karma points
    Aug 30, 2019 @ 17:50
    Gaurav Mathur
    0

    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.

  • Angelo 95 posts 197 karma points
    20 days ago
    Angelo
    0

    Hello Gaurav

    is there any documentation about your plugin FileSync ? im getting some errors in sync files ! ...

    thank you

    Angelo

  • Gaurav Mathur 10 posts 100 karma points
    20 days ago
    Gaurav Mathur
    0

    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

  • Angelo 95 posts 197 karma points
    17 days ago
  • Angelo 95 posts 197 karma points
    17 days ago
Please Sign in or register to post replies

Write your reply to:

Draft