[odb-users] Behaviour of PRAGMA busy_timeout on different platforms

Luisa Giacomini luisagiacomini.eu at gmail.com
Wed May 18 02:44:32 EDT 2016

Dear Boris,
  we are using odb 2.3 with sqlite and we are trying to write from
more than one writer on the same db (we know the sqlite is not exctly
designed for the task).

If we do nothing, some of the data to be written are just discarded,
in the aim of
avoinding that we applied a timeout to the various writers via the
PRAGMA busy_timout=N with N up to 30 seconds.
Every writer opens the db, sets the pragma and starts a loop
persisting 10000 new records each.

At this point we discovered a different behaviour on our to reference platforms:
A. Windows 8.1 64 bit Pro
B. Centos 6.5 x86_64

On (A) the persist operation suspends itself for up to N seconds if
the db is locked; if the db is not yet available after the time out
elapsed, is raised the exception "database operation timeout".

On (B) the persist operation does not wait and exits immediately with the
odb::core::exception "database operation timeout".

So the question is why? The busy_timeout PRAGMA does not work on linux?

Thanks in advance, Luisa Giacomini.

More information about the odb-users mailing list