Subject Re: Oldest transaction is stuck and slowing the database down
Author Adam
--- In firebird-support@yahoogroups.com, "kapsee" <kapil.surlaker@...>
wrote:
>
> Hi:
>
> I found some posts similar to this but did not completely answer my
> question.
>
> I am running into cases once in a while where the oldest transaction
> is stuck (almost a million behind the next transaction) and is slowing
> the database down. Is it possible to find out any details about that
> transaction, like the tables in has touched, any sql it has run etc ?
> Any other ways to debug this ?
>
> Thanks a lot!
>
> K
>

Not directly, but you do have the current_transaction environment
variable. We have created our own connection components by overriding
IBX at the moment (which allows us to change with little modifications
to the application code). This also allows us to catch calls to
'StartTransaction' and write information to an external table (beyond
transaction control) immediately, enough information to identify the
host, time, process calling etc. We have never needed to activate it
in production systems, and I imagine it may be difficult to trace if
you have hundreds of different possible programs connecting and you
don't have your own connection components.

How many transactions go through per day on average? This should give
you an idea of the age of the transaction. If it is measured in weeks,
then it is unlikely to be UI related, even users reboot their systems
with some frequency. Don't neglect services that you have running and
nightly cron jobs that might be importing or exporting data.

Adam