SQL Server 2014 In-Memory previous transaction aborted exception

  • I'm working on a large scale project that is currently in production. We have a big process that recently changed to use In-Memory Tables with SQL 2014 for performance efficiency.

    The Process uses:

    51 In-Memory SQL Tables.

    50 Stored Procedures (not native) that loads data(Insert) from about 150 regular Tables and IM tables.

    300 Validations (short stored procedure not native) Selecting from those 50 In-Memory Tables (And insert to In-Memory table that save the validation errors if exists on In-Memory table).

    At the end of this prosses we clean the table from the data that relavnt to etch prosses(DELETE FROM WHERE)

    B.T.W

    No UPDATE STAT on In-Memory are used-when we test the prosses it slow as down and cause some locks.

    We are calling this process from ADO.Net, loads stored procedure first and then validations, each SP use different SQL Connection. In normal use, everything works fine and takes about 1.5 second.

    Under stress test (6 Clients X 100 Tasks) for 30 minutes. After several minutes we are starting to get this SQL Exception (1 SQL Exception for every 20 tasks):

    41301. A previous transaction that the current transaction took a dependency on has aborted, and the current transaction can no longer commit.

    Transactions in Memory-Optimized Tables

    The Exception is not clear. We are not using BEGIN TRANSACTION in the process. The SQL Exception occurs in different stored procedures each time.

    After days of investigation we are stuck and we have no ideas any more. Asking your help to undersand what can cause this exception and how to deal with it.

    This workaround

    Looks like cheep workaround. And I'm more intersting to realize how this thing hapen.

    If any one can supply any exemple code that can recreate this error.

    Thank you,
    Rimer Sharon DBA

  • What Isolation Level is being used?

  • Hi.

    Read Committed.

    With is_memory_optimized_elevate_to_snapshot_on

    Thank you,
    Rimer Sharon DBA

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply