spaghettidba / WorkloadTools

A collection of tools to collect, analyze and replay SQL Server workloads, on premises and in the cloud
MIT License
234 stars 53 forks source link

Invalid operation. The connection is closed. #48

Closed ghotz closed 4 years ago

ghotz commented 5 years ago

During the replay sometimes an error similar to the following is logged:

2019-04-11 18:10:38.7648 - Error - WorkloadTools.Consumer.Replay.ReplayWorker : Worker [311] - Error: Invalid operation. The connection is closed. 2019-04-11 18:10:38.7648 - Error - WorkloadTools.Consumer.Replay.ReplayWorker : at System.Data.ProviderBase.DbConnectionClosed.ChangeDatabase(String database) at System.Data.SqlClient.SqlConnection.ChangeDatabase(String database) at WorkloadTools.Consumer.Replay.ReplayWorker.ExecuteCommand(ReplayCommand command) in C:\Users\gianl\Source\Repos\WorkloadTools\WorkloadTools\Consumer\Replay\ReplayWorker.cs:line 234

The error will continue to be be risen until the worker gets disposed and needs to be investigated.

More info:

  1. happens also with a small workload (e.g. 200-300 batches/sec)
  2. 16 CPUs on the replaying server all at 100% usage
  3. 500 workers configured in Workloadtools
  4. many errors during replay (e.g. trying inserting NULLs, missing procedures)