Subject What to do with old, active (unresolved, hanging) transactions?
Author vincent_kwinsey
Hi,

I am experiencing the following error messages:
page type 5 lock conversion denied (215)
page type 5 lock denied (216)
and there are frequent deadlock errors in application. I guess, that
application is leaving many transactions in unresolved state (not
committed, not rollbacked) and any deadlock only increase amount of
unresolved transactions, and hence - the amount of locks on records.
I have found in release guides - e.g. that some lock problems were
resolved on release 1.5.4, even some unregistered bug: it crashed the
pages, where the information about locks was kept.

So - my question is - what happens with these transactions and locks?
Are they remaining on database forever? A operations guide provide
information that backup/restore and gfix can recover transactions 'in
limbo' - but these are for two-phase commit.

But what tools can resolve the state of uncommitted transactions? I
have the following situation: user has started transaction and then
the error occured , or db connection was lost or so and so - the
transaction's state is unresolved and there is no chance to resolve
it by any means (I guess - there is no chance to make connection to
DB and request the handle of this old transaction and then commit or
rollback it??? Maybe there are some API functions for this???).
Documentation doesn't mention that recovery can be done by backup-
restore of gfix.

I see, that there are two main problems of these unresolved
transctions and locks:
1. oldest transaction number remains small forever and there can be
sweep with every new transaction, if automtic sweep is requested;
2. the biggest problem can be - that inventory pages for information
about unresolved transactions and locks can be become increasingly
large and then crash (it shouldn't happen and maybe it is already
resolved on 1.5.4...) - with error messages indicated in the start of
this post.

Can someone here provide more information what's going on and what to
do with old transactions and lock.

My DB is above 5GB and with some >20 users.

Thanks in advance,
Vincent