Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

404's logged multiple times #167

Closed
PhilDye opened this issue Sep 7, 2017 · 9 comments
Closed

404's logged multiple times #167

PhilDye opened this issue Sep 7, 2017 · 9 comments
Labels

Comments

@PhilDye
Copy link
Contributor

PhilDye commented Sep 7, 2017

v3.13.1 from nuget

We're seeing each genuine 404 request (ie falling right through, with no redirect) being logged 44 times. This is adding significant subsequent rows for subsequent queries to search, and hitting performance hard, especially as we've just launched it in a new site, that is generating significant 404's.

Possibly related to #166 ?

@PhilDye
Copy link
Contributor Author

PhilDye commented Sep 7, 2017

Correction; the 44 repeated log entries isn't consistent - it changes, always in the order of "tens" of entries. Suspect this may be retry handling in the DatabaseContext perhaps (we're using Azure SQL)?

@daniel-chenery
Copy link
Collaborator

daniel-chenery commented Sep 12, 2017

@PhilDye I can confirm 404s are being logged multiple times for me as well. However, it's only logging each 404 3 times.
I'll see if I can spin-up an Azure site sometime soon to replicate on there, and see if it is more logging.

In the meantime, if it is the same URL, you could potentially add it to the ignore list

@daniel-chenery
Copy link
Collaborator

@PhilDye I've a suspicion I know what's going on here. Would you mind telling me how many times the following is in your log file please? "UrlTracker HttpModule | Subscribed to AcquireRequestState and EndRequest events"

@PhilDye
Copy link
Contributor Author

PhilDye commented Sep 21, 2017

@daniel-chenery We'll need to turn up the logging; this site is now in production, so not running at INFO level currently... // @michaelchart

@daniel-chenery
Copy link
Collaborator

@PhilDye If it's not doable, then no worries :)

I've a suspicion it's down the the Modules being registered multiple times. I can only assume, Azure, being Shared Hosting has more AppPools, and therefore loads it an excessive amount of times.
Sadly, since the EndRequest is now moved to the UmbracoModule, this is also loaded multiple times so I can't easily determine if we've subscribed to it or not 🙄

@daniel-chenery
Copy link
Collaborator

@PhilDye Would you mind giving the latest BETA version and spin and see if this fixes it for you? :)

@PhilDye
Copy link
Contributor Author

PhilDye commented Sep 26, 2017

Running this locally first, I'm seeing every log entry (at least) duplicated, but even allowing for that, multiple Subscribed to AcquireRequestState events logged on start (see attached log)
umbracoTraceLog.txt

On the plus side, I do see each 404 getting inserted to the db only once, from some simple tests.

@PhilDye
Copy link
Contributor Author

PhilDye commented Sep 26, 2017

Is the duplicate Subscribed to AcquireRequestState simply down to this line being duplicated https://github.com/kipusoep/UrlTracker/blob/master/Modules/UrlTrackerModule.cs#L63 ?!

@daniel-chenery
Copy link
Collaborator

Yupp :)

If I pop that in the lock, it causes an (apparently) unknown YSOD.
Was bugging me for ages.

Thanks for the merge, I'll take a look shortly! :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants