I have been debugging an issue on one of our larger websites. The issue was that when publishing a large number of nodes the website would crash due to all pooled connections being in use and the max pool size had been reached.
After some debugging I traced the issue back to UnVersion which we had installed on the site. The issue should be able to be replicated by having many nodes under one parent, and then publishing the parent and all descendants via the Umbraco BackOffice. The website we discovered the issue on has many 1000s of nodes under a main parent.
I took the liberty of taking a peak at the source code. It looks as if the connection opened in line 60 of the UnVersionService.cs file is never closed before the garbage collector closes it. If this is correct it may be a good idea to use a "using" statement or a finally somewhere to ensure it is closed when no longer in use :)
Mass Publishing
I have been debugging an issue on one of our larger websites. The issue was that when publishing a large number of nodes the website would crash due to all pooled connections being in use and the max pool size had been reached.
After some debugging I traced the issue back to UnVersion which we had installed on the site. The issue should be able to be replicated by having many nodes under one parent, and then publishing the parent and all descendants via the Umbraco BackOffice. The website we discovered the issue on has many 1000s of nodes under a main parent.
I took the liberty of taking a peak at the source code. It looks as if the connection opened in line 60 of the UnVersionService.cs file is never closed before the garbage collector closes it. If this is correct it may be a good idea to use a "using" statement or a finally somewhere to ensure it is closed when no longer in use :)
*Link to source code file I peaked into: https://github.com/mattbrailsford/UnVersion/blob/master/Src/Our.Umbraco.UnVersion/Services/UnVersionService.cs
Fixed in v2.1 now available on as the main download. Thanks for your feedback.
is working on a reply...