Kbase P130709: How to use promon to detect a deadly embrace
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  6/7/2010 |
|
Status: Verified
GOAL:
How to use promon to detect a deadly embrace
GOAL:
Using promon to find which users have a record locked in a deadly embrace
GOAL:
<file-name> in use by <user> on <tty>. Wait or choose CANCEL to stop. (2624)
FACT(s) (Environment):
All Supported Operating Systems
Progress/OpenEdge Versions
FIX:
In any ABL application there is the possibility for two users to attempt to lock the same record at the same time. This is commonly referred to as a deadly embrace and produces the following error:
<file-name> in use by <user> on <tty>. Wait or choose CANCEL to stop. (2624)
There are a number of ways to program around this issue, to have the application handle it more gracefully, and even more to programmatically detect which user currently has the record locked. This solution provides a way to determine which user has the record locked, and to see a list of users that are currently contending for the same record, using promon.
From the main menu in promon, select option 4 "Record Locking Table" then select option 1 "Display all entries". You will see something like the following table:
Record Locking Table:
Usr Name Chain # Rec-id Table Lock Flags Tran State
Tran ID
23 <username> REC 99 97 2 EXCL Begin
1751
24 <username> REC 99 97 2 EXCL Q H Begin
1752
Note that both entries have a lock on the same Rec-id and notice the flags "Q" and "H" on the second lock. These flags indicate that the lock is queued and the lock is in hold status.