0

I am trying to execute a list of stored procedures using the below code.

The Dot Net 6.0/Dapper/MySQL code is throwing the following exception

Lock wait timeout exceeded; try restarting transaction

foreach (string sProc SpList)
{

    using (IDbConnection connection = new MySqlConnection(connString))
    {
         var result = await connection.ExecuteScalarAsync(sProc , null, commandType: CommandType.StoredProcedure);
    }
}

Some of the stored procs was taking more than 10 minutes to complete on the work bench. This is a backend job and I just want to execute list of stored procedures successfully.

Thanks for your suggestion.

Amit Joshi
  • 15,448
  • 21
  • 77
  • 141
Ullan
  • 905
  • 4
  • 15
  • 28

0 Answers0