Skip to content

Memory issues in IDocumentUrlService after upgrading to v17 #21055

@SelwynEdelbroek

Description

@SelwynEdelbroek

Which Umbraco version are you using?

17.0.0

Bug summary

We have upgraded a website from v8 to v17 for a client of ours. This website has a lot of nodes, containing many movies, games and series with ratings about if it is safe to watch or play for Dutch citizens. This dataset contains in and about 9 million urls:
Image

Memory usage:
Image

Before the website started with an average of 4 GB of memory on load a startup in v8. After upgrading to v16 or v17 we noticed that the IDocumentUrlService is caching all these urls segments.
While starting the website v16/v17 before fully booted the website uses up to 8GB of memory. When we uses a clean Umbraco v16 or v17 instance the memory usage is around 1 or 1.5gb with the IDocumentUrlService removed and referencing the database of the client. Since this upgrade we've noticed an big difference in memory load since this newer Umbraco version. This memory change is a problem for hosting services or platforms regarding out of memory issues when using a large website with several languages. We currently are experiencing slow Umbraco instances and or server due to the memory usage.

Specifics

This happens on startup of the v17 website inside the IDocumentUrlService, inside the init method the code starts fetching all DB entries and caches them inside a dictionary.

Steps to reproduce

We have an Umbraco v17 project that reproduces our scenario, this is included in the zip file. To check the Umbraco backoffice please check the appsettings inside the project.

Reproduce from scratch would be:

  1. Create Umbraco instance with minimum of 10 to 20 languages
  2. Add pages with inheritance and a node structure like blog posts

UmbracoMemoryUsage.zip

Expected result / actual result

The expected result: it would be nice that the in memory usage would not increase on startup.
The actual result: the Umbraco startup fetches all content of the referenced DB table and stores it in memory.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions