Server Error in '/' Application.

Deadlock found when trying to get lock; try restarting transaction

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: MySql.Data.MySqlClient.MySqlException: Deadlock found when trying to get lock; try restarting transaction

Source Error:


Line 39:                        
Line 40:                     End With
Line 41:                     cmd.ExecuteNonQuery()
Line 42:                 End Using
Line 43:             End Using

Source File: d:\www\rest.sexwriter.dk\App_Code\funktioner.vb    Line: 41

Stack Trace:


[MySqlException (0x80004005): Deadlock found when trying to get lock; try restarting transaction]
   MySql.Data.MySqlClient.MySqlStream.ReadPacket() +352
   MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId) +117
   MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId) +17
   MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force) +110
   MySql.Data.MySqlClient.MySqlDataReader.NextResult() +931
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +1629
   MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() +121
   funktioner.ExecuteMysqlSI(String cmdTxt, Dictionary`2 params) in d:\www\rest.sexwriter.dk\App_Code\funktioner.vb:41
   MasterPage.Page_Load(Object sender, EventArgs e) in d:\www\rest.sexwriter.dk\MasterPage.master.vb:430
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4087.0