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...