Note that there are some explanatory texts on larger screens.

plurals
  1. POMysqlMembership Membership.ValidateUser Deadlock issue when under load
    primarykey
    data
    text
    <p>I have a WCF Webservice with a custom httpModule which I use to do UserName/Password authentication against the MysqlMembership.</p> <pre><code>public void Init(HttpApplication application) { application.AuthenticateRequest += new EventHandler(this.OnAuthenticateRequest); application.EndRequest += new EventHandler(this.OnEndRequest); } public void OnAuthenticateRequest(object source, EventArgs eventArgs) { ... ... if (Membership.ValidateUser(username, password)) { </code></pre> <p>When I started loadtesting my service, I came across a perplexing problem. Requests randomly fail the Membership.ValidateUser call. I am using the same username/login for each thread in my load tester. Here is the error:</p> <pre><code> [MySqlException (0x80004005): Deadlock found when trying to get lock; try restarting transaction] MySql.Data.MySqlClient.MySqlStream.ReadPacket() +506 MySql.Data.MySqlClient.NativeDriver.GetResult(Int32&amp;amp; affectedRow, Int32&amp;amp; insertedId) +450 MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force) +131 MySql.Data.MySqlClient.MySqlDataReader.NextResult() +1216 MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +2191 MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() +27 MySql.Web.Security.MySQLMembershipProvider.ValidateUser(String username, String password) +1092 [ProviderException: An exception occurred. Please check the Event Log.] MySql.Web.Security.MySQLMembershipProvider.ValidateUser(String username, String password) +1481 MyApplication.UserAuthenticator.UserNameAuthenticator.OnAuthenticateRequest(Object source, EventArgs eventArgs) in C:\Develop\MyProject\MyProject.UserAuthenticator\UserNameAuthenticator.cs:123 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp;amp; completedSynchronously) +270 </code></pre> <p>Any ideas?</p> <p>Thanks, AFrieze</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload