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?