c# - Entity Framework 4.3 .Net 4.0 Sql Server 2008 r2 Locking Issues -
we have web application load balanced on 4 servers connection db cluster of 2 physical servers pointing @ same mdf file location. 1 server master , other slave.
i have example database 2 tables, lets users , usertestresults
usertestresults has unique key used foreign key in users table.
lets want update users results every ten minutes, facilitate have timestamp column on results table. check last updated date.
the issue: on occasion when attempting update results , committing dbcontext, table lock generated (expected doing update on table), appears @ same time request view results user made, request select data table wait until update has completed, sort of lock appears stay locked indefinitely (doesnt ever release). user attempting access results view appears wait process complete, resulting in db connection timeout.
this doesnt occur appears happening more frequently.
we using unity register dbcontext , entity framework repository results. entity framework repository registered perresolvelifetimemanager.
we manually fail on slave server , appears clear locks.
any ideas why lock may not releasing ever? cheers
Comments
Post a Comment