Deadlock timeouts
Posted in 1994
One of my projects is plagued with "deadlock timeouts" and programs getting
stuck in infinite loops and I'm hoping for some insight. An SCO Unix/Informix
OnLine 4.10 system is running at least 20 4GL processes at any given point in
time that operate on a common pair of header/detail tables, which I'll call
'mh' and 'md'. It was foreseen that the number of programs that will access
mh and md will increase rapidly (about 60 currently) so a library, 'mlib', was
developed to standardize access. At this point, I suspect the usage of 'set
lock mode to wait', a serial field in mh and a high degree of traffic to
contribute to consistent deadlock timeout conditions. The isolation level,
set by mlib, is dirty read for all programs. A function, 'mlock()', is used to
secure rows in mh on an 'mopen' and it uses a prepared statement similar to
this:
update mh set mstatus = mstatus where mh_id = ? and mstatus not in (x,y,z)
I'm wondering if there is some needed modification to mlib or will a newer
version of the engine employ a different locking scheme to eliminate this
problem. Thank you for your attention and for any advice you can offer.
Edwin Babadaglian
edwinb@panix.com