Fluent Model doing Rollbacks on Read in DA Profiler

Thread is closed for posting
2 posts, 0 answers
  1. Guy
    Guy avatar
    4 posts
    Member since:
    Apr 2015

    Posted 06 Mar 2017 Link to this post

    Recently moved from RLINQ or Database First to Fluent Code First.  We are running 10 times slower than we were.

    Running the DA Profiler the difference is quite apparent.  The SQL Transactions are showing Rollbacks that were not occurring previously.  I broke it down to just reading the Database and making no changes and I'm still getting Rollbacks.  I have tried all option with the backend here are my current settings:

    public static BackendConfiguration GetBackendConfiguration()

            {
                BackendConfiguration backend = new BackendConfiguration();
                backend.Backend = "MsSql";            
                backend.ProviderName = "System.Data.SqlClient";            
                backend.Logging.LogEvents = LoggingLevel.None;
                backend.Logging.MetricStoreSnapshotInterval = 0;
                backend.ConnectionPool.ActiveConnectionTimeout = 180;
                backend.ConnectionPool.Reserved = 2;
                backend.ConnectionPool.MaxActive = 20;
                backend.ConnectionPool.Integrated.TestInterval = 180;
                backend.ConnectionPool.Integrated.MaxIdle = 20;            
                backend.Runtime.CacheReferenceType = CacheReferenceType.Auto;
                backend.Runtime.ClassBehavior = DataAccessKind.Default;
                backend.Runtime.CompiledQueryCacheSize = 1000;
                backend.Runtime.ReadWithoutTransactions = true;
                backend.Runtime.Concurrency = TransactionMode.OPTIMISTIC_NO_LOST_UPDATES;
                backend.Runtime.SupportConcurrentThreadsInScope = true;
                backend.Runtime.LockTimeoutMSec = 60000;
                backend.Runtime.ReturnNullForRowNotFound = true;
                backend.Runtime.CommandTimeout = 180;
                backend.Runtime.StatementBatchingEnabled = true;
                backend.Runtime.StatementBatchingThreshold = 1;
                backend.Runtime.StatementBatchingSize = 100;            
                backend.SecondLevelCache.Enabled = false;
                backend.Logging.LogEvents = LoggingLevel.Normal;
                backend.Logging.StackTrace = true;
                backend.Logging.EventStoreCapacity = 10000;
                backend.Logging.MetricStoreCapacity = 3600;
                backend.Logging.MetricStoreSnapshotInterval = 1000;
                backend.Logging.Downloader.EventPollSeconds = 1;
                backend.Logging.Downloader.MetricPollSeconds = 1;            


                CustomizeBackendConfiguration(ref backend);

                return backend;
            }

     

    What could be causing reads to have SQL transactions and them being rolled back?

     

     

  2. Guy
    Guy avatar
    4 posts
    Member since:
    Apr 2015

    Posted 08 Mar 2017 in reply to Guy Link to this post

    So after many setting changes I could not stop Rollbacks occurring when reading from the DB.  I thought the Read Transaction Rollbacks were a performance issue, after finding the true cause of my performance issue there are still Read Rollbacks, but I'm able to read from the database now from 2016.2.822.1 as quick as I did with 2015.1.225.1.

    The Rollbacks are still happening according to the DA Profiler, but they don't seem to be hindering performance.

    This article explains the issue:

        http://www.telerik.com/forums/speed-issues-after-upgrade

     

Back to Top