Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • John Bergman 424 posts 976 karma points
    Jul 19, 2017 @ 21:13
    John Bergman

    SQL Transaction has completed exception

    Just wondering if anyone has seen this exception, and might know what the cause is? Any pointers would be GREATLY appreciated; it feels like a bug in Umbraco (I have already opened one), but since it doesn't appear to be on the radar yet for a fix, I need to see if I can find a work around. I get about a dozen of these a day. Sometimes the code works, sometimes it throws the exception.

    The line of code making the call is as follows:

      var findMember = umbracoMemberService.GetMembersByPropertyValue("profileURL", profileUrl, StringPropertyMatchType.Exact).SingleOrDefault();

    Here is the exception

    Exception information: 
        Exception type: InvalidOperationException 
        Exception message: This SqlTransaction has completed; it is no longer usable.
       at System.Data.SqlClient.SqlTransaction.ZombieCheck()
       at System.Data.SqlClient.SqlTransaction.Commit()
       at Umbraco.Core.Persistence.Database.CleanupTransaction()
       at Umbraco.Core.Scoping.Scope.DisposeLastScope()
       at Umbraco.Core.Scoping.Scope.Dispose()
       at Umbraco.Core.Persistence.UnitOfWork.ScopeUnitOfWork.DisposeResources()
       at Umbraco.Core.DisposableObject.Dispose(Boolean disposing)
       at Umbraco.Core.DisposableObject.Dispose()
       at Umbraco.Core.Services.MemberService.GetMembersByPropertyValue(String propertyTypeAlias, String value, StringPropertyMatchType matchType)
       at upventur.Community.Core.Events.Routing.UserFeedVirtualNodeRouteHandler.FindContent(RequestContext requestContext, UmbracoContext umbracoContext) in D:\ORMG\3.1\V3.1\upventurCommunity\upventur.Community.Core.Site\Community\Core\Events\Routing\UserFeedVirtualNodeRouteHandler.cs:line 42
       at Umbraco.Web.Mvc.UmbracoVirtualNodeRouteHandler.GetHttpHandler(RequestContext requestContext)
       at System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context)
       at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
  • John Bergman 424 posts 976 karma points
    Jul 27, 2017 @ 01:57
    John Bergman

    Anyone have any tips as to how to determine what the root cause of this is? Even catching and retrying the operation causes it to fail. Any insight or pointers would be GREATLY appreciated

    Here is the code that it is in, "GetMembersByPropertValue()" is the line that is failing.

    IMemberService umbracoMemberService = ApplicationContext.Current.Services.MemberService;

    //-- Get the real Umbraco IPublishedContent instance as a reference point var nodeReference = umbracoHelper.TypedContent(documentTemplates.MemberFeedTemplateNodeId);

    //-- Get the user's profile Url (see virtualPathConstants for virtual pathing information) string profileUrl = umbracoContext.HttpContext.Request.Url.Segments[3];

    //-- Locate the member based on the profile Url... IMember findMember = null;

    findMember = umbracoMemberService.GetMembersByPropertyValue("profileURL", profileUrl, StringPropertyMatchType.Exact).SingleOrDefault();

  • Rasmus Eeg 86 posts 444 karma points c-trib
    Aug 04, 2017 @ 14:52
    Rasmus Eeg

    Hi There,

    I'm experiencing the same issue.

    It even appears that Umbraco.TypedMember(item.Id) throws same exception:

    2017-08-04 16:53:00,527 [T38] ERROR ]SmukfestLMS.Web.ExamineIndexes.ReportingDataService - Failed to get data set.
    System.InvalidOperationException: This SqlTransaction has completed; it is no longer usable.
       at Umbraco.Core.Cache.HttpRequestCacheProvider.GetCacheItem(String cacheKey, Func`1 getCacheItem)
       at Umbraco.Core.Cache.CacheProviderExtensions.GetCacheItem[T](ICacheProvider provider, String cacheKey, Func`1 getCacheItem)
       at SmukfestLMS.Web.ExamineIndexes.ReportingDataService.GetAllData(String indexType) in C:\Users\rem.CP-NET\Documents\Visual Studio 2017\Projects\smukfest_lms\SmukfestLMS\ExamineIndexers\ReportingDataService.cs:line 66

    We have about 300 active users right now, that appears to cause the issue. Working fine locally.

    Did you find a solution?

  • John Bergman 424 posts 976 karma points
    Aug 14, 2017 @ 16:15
    John Bergman

    Nope, no solution yet. I am going to upgrade to 7.6.5 tonight to see if there is still the same issue, if there is, we should open a bug report

  • John Bergman 424 posts 976 karma points
    Aug 24, 2017 @ 03:30
    John Bergman

    still seem to be getting this, has anyone found a solution?

  • Kel Way 1 post 71 karma points
    Mar 18, 2019 @ 17:15
    Kel Way

    Hi John,

    Anything you or others can share on how you may have addressed this problem in these last months? We just went live with an Umbraco installation and are seeing quite a bit of this error.

    Thank you, Kel

  • Rasmus Eeg 86 posts 444 karma points c-trib
    Mar 18, 2019 @ 21:07
    Rasmus Eeg

    Hi Kel,

    Have you seen my comment below? I suggest that you query for members using examine/lucene index.

  • Rasmus Eeg 86 posts 444 karma points c-trib
    Aug 24, 2017 @ 15:49
    Rasmus Eeg

    A found a solution for my project, by using examine instead of Umbraco.TypedMember, which apparently uses sql to find my values. And not the examine index, like the Umbraco.TypedMedia does. Wierd

    I think we need to post a issue on

  • John Bergman 424 posts 976 karma points
    May 17, 2019 @ 06:19
    John Bergman

    I stopped using TypeMember, and just used memberservices and then manually constructed the generated member object around it.

Please Sign in or register to post replies

Write your reply to: