Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Performance and...Performance and...UpdateUser timeoutsUpdateUser timeouts
Previous
 
Next
New Post
11/26/2013 3:12 AM
 
Besides check size of your database transaction log, if it is too large, it might affect performance as well.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
11/26/2013 3:50 AM
 

Database size is little over 17GB and transaction log stays relatively small at 1-2GB. Simple recovery model is used, and the database is backed up once a day.

In total, we run quite a few DNN installations, each with a different setup of custom modules, mostly line-of-business apps for the local market. Practically all of these modules read the Users table, and I cannot exclude that some queries could lock rows in the Users table, or at least cause contention for server resources under heavy load. However, this particular instance has the most dedicated server resources, and it worries me that it doesn't seem to scale up well. But I still think that beefing up the database server with more cores could ease this, since the DB server's processor usage runs pretty high now.

 
New Post
11/26/2013 9:00 AM
 

I would start by looking for modules that are directly manipulating the user table - instead of accessing it thru the dnn api.
DNN internally uses a number of cache mechanisms when working with the user table - if these are being bypassed somewhere else in the system it could be a case that the load is being caused by some errant module - which results in a user table lockout.

Westa

 
New Post
4/6/2014 12:49 PM
 
This problem was finally solved. Timeouts were caused by queries to a large table (> 10GB) with joins to the Users table, running in serializable isolation level.

Of the combination of factors the most important cause of timeouts was  the serializable isolation level, without it there would have been just general performance degradation. Debugging was made more difficult by the fact that serializable was set only by another, quite rare transaction, that didn't return the isolation level back to default (read committed), after committing the transaction.

Because debugging this problem had a lot of false starts and "wrong" fixes like upgrading the database server hardware, it might be helpful to recall the right steps that eventually helped to solve the problem.

1. The blocked process report

The key to finding the problem was this excellent blocked process report, using SQL 2012 extended events:
I recommend it to anyone debugging timeouts, I didn't find other tracing tools much helpful.

Blocked process reports showed both blocked queries and blocking queries and the isolation level they are using. You can define a threshold for the wait time, I traced queries waiting for 5 seconds or more. This limited my problem to a single search view in the application, one that runs a SELECT query to a large table (over 1,5M rows and 10GB data) with joins to multiple other tables, including the Users table.

2. Removing joins

Next, I removed the joins from the search query, which helped to eliminate UpdateUser timeouts, but didn't stop blocking when updating the large table itself.

3. Resetting the isolation level

The remaining blocking problems finally tipped me to check the isolation level, which is found in the blocked process report, or in real time by using dm_exec_sessions:
From the real time dm_exec_sessions query I found that some, but not all connections were running in serializable isolation level.

The reason for this, it turned out, was that the isolation level set by .NET SqlCommand is persisted to subsequent commands:
"After a transaction is committed or rolled back, the isolation level of the transaction persists for all subsequent commands that are in autocommit mode (the SQL Server default). This can produce unexpected results, such as an isolation level of REPEATABLE READ persisting and locking other users out of a row. To reset the isolation level to the default (READ COMMITTED), execute the Transact-SQL SET TRANSACTION ISOLATION LEVEL READ COMMITTED statement, or call SqlConnection.BeginTransaction followed immediately by SqlTransaction.Commit."

Finally, I searched the codebase for transactions with non-default isolation levels, and added a resetting commit after each:

SqlTransaction txReset = conn.BeginTransaction(IsolationLevel.ReadCommitted);
txReset.Commit();

With these changes in place, the blocking process report stopped showing any new problems. I let it run for a few weeks before finally stopping the extended event tracing and closing the issue. 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Performance and...Performance and...UpdateUser timeoutsUpdateUser timeouts


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out