kipusoep/UrlTracker

UrlTracker needs to move away from using EndRequest - breaking in Umbraco 7.6

Shazwazza opened this issue · 3 comments

Hi,

In 7.6 we are fixing how database connections are managed, currently there is 2x of db connections, one that is used with ApplicationContext.Database and the other is the legacy SqlHelper. The SqlHelper should simply not be used anymore, however since you are using it you need to be aware of some changes. We are wrapping the SqlHelper to use the single connection - thus avoiding double the overhead of SQL connections and connection leaks. As you know, we dispose of resources on EndRequest including the ApplicationContext.Databse but the SqlHelper connection doesn't get explicitly disposed (i.e. connection leak) so by having this existing issue you are still able to use SqlHelper in your EndRequest method.
We've have previously described ways that you can work around using EndRequest now it but i realize that time is limited and so I'm letting you know about a simpler change that you'll need to make to your codebase to support 7.6.

We'll create a new event on our own UmbracoModule: UmbracoModule.EndRequest which you can subscribe to. It will also contain an instance of UmbracoRequestEventArgs which will have a reference to UmbracoContext and HttpContext so you don't need to rely on singletons in your code.

Cheers!

@daniel-chenery why is this closed? it has not been resolved

@CasperTDK This task is to simply not use EndRequest, right? And use Umbraco's EndRequest event. Which has been implemented here

There are some aspects of the code which use the legacy SqlHelper (#122). Is that what you're referring to?

I'm happy to re-open if you believe I've missed something somewhere :)

@daniel-chenery very sorry, I somehow misread the latest commits! I agree it is resolved