Re: [firebird-support] lock conflict deadlock

2016-04-05 Thread Alexey Kovyazin a...@ib-aid.com [firebird-support]

Hi Sergio,

Definitely there should transaction which produces conflict, probably 
your query does not catch it.


You can track it with Monlogger - download HQbird, install it and 
register as trial (14 days), then connect with MonLogger to your 
database and at the moment of error message click get Snapshot.


MonLogger saves all data from MON% tables for the investigation in the 
folder, and on the tab Transaction it highlights with red color those 
transactions which are potentially conflict, so you can review which 
application runs it.


Regards,
Alexey Kovyazin
IBSurgeon










Hello! I'm having a problem which I don't undestand. I'm getting a 
deadlock error in my app, but when I see the active transactions (I 
attach the select I'm using) I see all read-only transactions active.


So, the question is: How can I get a deadlock error when I have just 
read-only transactions active?



To solve the problem, I have to stop/restart Firebird.


Thanks!!


Sergio


---


select

ma.mon$attachment_id,

mt.mon$transaction_id,

ma.mon$server_pid,

ma.mon$state,

ma.mon$attachment_name,

ma.mon$user


from

mon$transactions mt

left join mon$attachments ma on ma.mon$attachment_id = 
mt.mon$attachment_id



order by mt.mon$transaction_id








Re: [firebird-support] lock conflict deadlock

2016-04-05 Thread shg_siste...@yahoo.com.ar [firebird-support]
sorry, I just copied a part of the select in the message. I do include that 
flag in the actual select.  

 Here it is the complete select. I'm sending '-1' in "in_trans"
 
 

 select
 ma.mon$attachment_id,
 mt.mon$transaction_id,
 ma.mon$server_pid,
 ma.mon$state,
 ma.mon$attachment_name,
 ma.mon$user,
 ma.mon$role,
 ma.mon$remote_protocol,
 ma.mon$remote_address,
 ma.mon$remote_pid,
 ma.mon$character_set_id,
 ma.mon$timestamp,
 ma.mon$garbage_collection,
 ma.mon$remote_process,
 ma.mon$stat_id,
 mt.mon$read_only
 

 from
 mon$transactions mt
 left join mon$attachments ma on ma.mon$attachment_id = 
mt.mon$attachment_id
 

 where (mt.mon$transaction_id = :in_trans) or (:in_trans = -1)
 

 order by mt.mon$transaction_id
 


 




Re: [firebird-support] lock conflict deadlock

2016-04-05 Thread liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
Hi,
 
chow do you check that transaction is readonly?
in your select this field is not included
 
regards,
karol Bieniaszewski
 
 
W dniu 2016-04-05 15:29:11 użytkownik shg_siste...@yahoo.com.ar 
[firebird-support]  napisał:
 
Hello! I'm having a problem which I don't undestand. I'm getting a deadlock 
error in my app, but when I see the active transactions (I attach the select 
I'm using) I see all read-only transactions active.
So, the question is: How can I get a deadlock error when I have just read-only 
transactions active?
 
To solve the problem, I have to stop/restart Firebird.
 
Thanks!!
 
Sergio
 
---
 
select
        ma.mon$attachment_id,
        mt.mon$transaction_id,
        ma.mon$server_pid,
        ma.mon$state,
        ma.mon$attachment_name,
        ma.mon$user
 
    from
        mon$transactions mt
        left join mon$attachments ma on ma.mon$attachment _id = 
mt.mon$attachment_id
 
    order by mt.mon$transaction_id
 
 

 

[firebird-support] lock conflict deadlock

2016-04-05 Thread shg_siste...@yahoo.com.ar [firebird-support]
Hello! I'm having a problem which I don't undestand. I'm getting a deadlock 
error in my app, but when I see the active transactions (I attach the select 
I'm using) I see all read-only transactions active.

So, the question is: How can I get a deadlock error when I have just read-only 
transactions active?
 

 To solve the problem, I have to stop/restart Firebird.
 

 Thanks!!
 

 Sergio
 

 ---
 

 select
 ma.mon$attachment_id,
 mt.mon$transaction_id,
 ma.mon$server_pid,
 ma.mon$state,
 ma.mon$attachment_name,
 ma.mon$user
 

 from
 mon$transactions mt
 left join mon$attachments ma on ma.mon$attachment_id = 
mt.mon$attachment_id
 

 order by mt.mon$transaction_id