Firebird error message “Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements”

StackOverflow https://stackoverflow.com/questions/12962819

  •  08-07-2021
  •  | 
  •  

Question

My application generates sometimes this kind of errors when accessing Firebird database:

Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements GDS Code: 335544726 - SQL Code: -902 - Error Code: 406'

What could be the problem? Is there any way to debug this?

I'm running Firebird 2.5.1 on Windows 7. There are at least kinterbasdb with Python and UIB components with Delphi in use.

Was it helpful?

Solution

Looks like the reason for this was using same connection/transaction from multiple threads.

OTHER TIPS

After we have switched to UIB (from IBX) we had many errors like this too.
It is caused by the transaction kind (Option) of TUIBTransaction. Both:
"Read Commited": [tpNowait,tpReadCommitted,tpRecVersion] and
"Snapshot" : [tpConcurrency,tpNowait]
caused the same, because of "tpNowait". Especially after switched from normal HDDs to SSD. (Inserting sleep(2); between each line, line TR.Start; sleep(2); ... TR.Commit; helped a bit but did not fully solved. )

We did not want to use simply "tpWait" because it was too risky the APP may hang forever.

So the solution was to:
1.) Change transaction Option to "default". [tpConcurrency,tpWait,tpWrite]
2.) We set at runtime TR.LockTimeOut := 5; //seconds every each time before starting a transaction. (If failed because of the timeout, you may repeat the execution with higher value, while it is wise to inform the user about the frozen UI.)

IMPORTANT:
The current (2016) UIB code can not handle LockTimeOut at all. First it has to be fixed. See code here...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top