Subject Re: [firebird-support] Finding a deadlocked transaction
Author PenWin
>> Is there some way to list currently active transaction on a given
>> database? I keep getting a deadlock at a certain place in my code, and I
>> can quite understand *why* I am getting it, but I just can't find which
>> transaction is left active - obviously I am overlooking one, but I just
>> can't find it, everywhere I look, I see started transactions properly
>> committed (or rollbacked). So I thought I would place breakpoints at
>> critical moments of my code, listing active transactions at each
>> breakpoint, until I located the forgotten transaction.
>>
>> I had great hopes in the -list parameter of gfix, but apparently I don't
>> have any limbo transactions, even just before I get the deadlock :-(
>
> Use the monitoring table MON$TRANSACTIONS in Firebird 2.1 and up.

Thanks. MON$TRANSACTIONS solved the problem. It turns out I didn't have
any forgotten active transactions, but that the two simultaneous
connections I use used a different transaction isolation mode (one was
Read Commited and the other Concurrency). That was causing the problems.
I switched to Read Commited on both connections and voila, it works.

Thanks,

Pepak