Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
pnpsql
Posting Yak Master
246 Posts |
Posted - 2012-10-18 : 11:27:20
|
hi team ,i have got error message in my application logger that lock request time period exceeded and but this occurs in case we are not able to find . because application is running from different location and issue is not always comes. please help me to get the proc that leads to issue and how to correct it.please help i am not able to do this.challenge everything |
|
komkrit
Yak Posting Veteran
60 Posts |
Posted - 2012-10-24 : 05:57:39
|
Hi pnpsql,"Lock Request Timeout", it explain itself by naming. It is concurrency problem.It came from two or more sessions trying to use the same resource at the same time.When the first sessions completely acquired resource, the resource was locked until the session end or transaction end. The later sessions can not acquire resource unless the first session release its resource first.After reaching a certain period of time, if the later sessions can not acquire the resource, then "Lock Request Timeout" event would raised error then statement terminated immediately."Lock Request Timeout" is different than other timeout such as connection timeout or execution timeout.That we will not mention it right now.To check a certain period of time that raise "Lock Request Timeout" when it reach.The global variable @@LOCK_TIMEOUT is session base that store "Lock Request Timeout" value for each session. Use the following command.---------------------SELECT @@LOCK_TIMEOUT---------------------To modify "Lock Request Timeout" value for each session, use following command.---------------------SET LOCK_TIMEOUT <number or sesonds>---------------------To check which statement, which resource, which session,username or hostname that makes the lock timeout.I usually use SQL Profiler to open trace for capturing Lock event named "Lock:Timeout (timeout > 0)"It will show the source of locking and lead me to root cause of problem finally.- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Komkrit YensirikulWelcome for all questions. Let us know if our solution solved your problem. |
|
|
|
|
|