Copied to clipboard

Flag this post as spam?

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

  • Wasim 1 post 21 karma points
    Sep 04, 2018 @ 06:57

    Umbraco database's high CPU usage


    We have two sites running under the same umbraco installation. The sites are hosted on azure and running properly for the last 2 years. For the last one month, we often found a DB query is taking very long time to execute and essentially blocked other DB operations. The Database DTU becomes 100%. The sites were down twice in the last one month for around 5-10 minutes.

    Following is the query that blocking DB:

    (@0 nvarchar(40),@1 int,@2 int)SELECT cmsPropertyData.* FROM cmsPropertyData INNER JOIN cmsPropertyType ON cmsPropertyData.propertytypeid = INNER JOIN (SELECT cmsContent.nodeId, cmsContentVersion.VersionId FROM [cmsDocument] INNER JOIN [cmsContentVersion] ON [cmsDocument].[versionId] = [cmsContentVersion].[VersionId] INNER JOIN [cmsContent] ON [cmsContentVersion].[ContentId] = [cmsContent].[nodeId] INNER JOIN [umbracoNode] ON [cmsContent].[nodeId] = [umbracoNode].[id] LEFT OUTER JOIN [cmsDocument] [cmsDocument2] ON ([cmsDocument2].[nodeId]=[cmsDocument].[nodeId] AND [cmsDocument2].[published]=1) WHERE ([umbracoNode].[nodeObjectType] = @0) AND ([umbracoNode].[parentID] = @1) AND ([cmsDocument].[newest] = @2) ) as docData ON cmsPropertyData.versionId = docData.VersionId AND cmsPropertyData.contentNodeId = docData.nodeId LEFT OUTER JOIN cmsDataTypePreValues ON cmsPropertyType.dataTypeId = cmsDataTypePreValues.datatypeNodeId

    The site is using Umbraco 7.3.7, and the database is running at Standard tier S1:20 DTUs (Max data size: 2GB, 56% used).

    It would be great if anyone could suggest any workaround to resolve the problem.

  • MatsStam 50 posts 195 karma points
    Sep 04, 2018 @ 08:12

    Just glancing at the query, it seems to be getting all the properties of all the versions.

    Could it be there are ALOT of versions? Alot of small saves/publishes? Only thing I can think of without going even deeper :P

    Could try and find out if a page has a whole bunch of versions mayhaps? And remove the old versions, or maybe someone has a way to just make that query better :P Not sure when it's used exactly, but that'd be the direction I'd look in.

Please Sign in or register to post replies

Write your reply to: