Geta / geta-notfoundhandler

The popular NotFound handler for ASP.NET Core and Optimizely, enabling better control over your 404 page in addition to allowing redirects for old URLs that no longer works.
Apache License 2.0
20 stars 16 forks source link

Question/issue?: Does the plugin load all suggestions during startup? #148

Open MikaelPorttila opened 1 week ago

MikaelPorttila commented 1 week ago

Hi

I have noticed a pattern during startup of sites with a large number of suggestions that a database CPU spike will occur which sometimes will cause timeouts.

Purging the suggestions manually will remove the CPU spike and normal operations will resume.

I haven't dug into any code yet but my gut feeling is that something cause the plugin to start fetching all suggesions during the startup, maybe this is by design to have a hashset of urls available in the the memory to speed up 404-handling? or is this an actual bug/ unexpected side-effect? Any setting to limit the number of suggestions loaded during startup?

The admin UI handles the large number of suggestions with ease by using pagination so the issue mainly affects the site startup only.

image