Skip to content

V15: Add logging to DocumentUrlService & other bootup services to diagnose slow startup times #19536

@warrenbuckley

Description

@warrenbuckley

Which Umbraco version are you using?

15.4.1

Bug summary

Add logging to DocumentUrlService and other services that are running during bootup to help diagnose bootup/startup time issues.

Specifics

When trying to debug an issue with why we were seeing a slow bootup time around 2minutes, the last log entry was hanging on Checking Publisher which led me to believe the issue was with uSync

[09:29:19 DBG] Running uSync.Complete migrations
[09:29:19 DBG] Checking uSyncsnapshots
[09:29:19 DBG] Checking uSyncComplete
[09:29:19 DBG] Checking uSyncComplete-Restore
[09:29:19 DBG] Checking Publisher
[09:32:41 INF] uSync: Running Import at startup Settings

After chatting with Kevin we agreed it seemed that the issue was coming from elsewhere.

I then done a profiling session with Rider & DotTrace to see some hot paths whilst the application was booting and was then pointed to Umbraco.Cms.Core.Services.DocumentUrlService+<>c__DisplayClass25_0.<GetModelFromCache>b__0(PublishedDocumentUrlSegments)

Image

After a friendly chat with @Migaroez he then told me the issue that I was seeing had been fixed in 16.0.0 with this PR - #19498

Steps to reproduce

Use a large amount of content and boot the site up and see slow startup time and no useful log messages
Set default log level to verbose.

Expected result / actual result

When debugging slow start-up times, for all services from Umbraco it would be good to log messages out to inform the user what is going on so the problem area can be identified easier/quicker.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions