With NopCommerce I’ve noticed high waits on sql querys resolving when hitting a database in a test environment for local development. This problem becomes more apparent when your seed / test dataset is quite large.
When logging into the Administration area, I would frequently get the following, despite setting a high connection timeout period:
1 2 3 4 5 6
Exception Details: System.ComponentModel.Win32Exception: The wait operation timed out An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [Win32Exception (0x80004005): The wait operation timed out] The stack trace pointed towards PageList.cs class, the method hit returns an IQueryable DbSet. The initial Administrator dashboard performs a lot of I/O reads which has a large contribution towards the timeout issue.
All the dashboard statistic calls are within a single View which can be found at:
To avoid running these on your machine, use the HttpContext.Current.IsDebuggingEnabled and wrap in an If, like below: