[odb-users] Re: odb::timeout on sqlite

Andrew Cunningham odb at a-cunningham.com
Wed May 25 12:32:37 EDT 2016

What I do is use the SQLite "amalgamation" of sqlite.c and embed that in my
build of libodb-sqlite so there is no confusion about what version of
SQLite I am using and what options are active.

> Hales, Steve <Steve.Hales at garmin.com> writes:
> > My team is developing an iOS app using ODB 2.4.0 on a sqlite3 database.
> > Our app has a number of background processes that access the database
> > from multiple threads.
> By "processes" you don't mean actual operating system processes, correct?
> In other words, you have a single application (process) that runs multiple
> threads.
> > Occasionally, our app receives an odb::timeout exception. I looked in
> > the ODB code and found that this exception might be thrown as a result
> > of a SQLITE_LOCKED or SQLITE_BUSY error. It is my limited understanding
> > that this may be caused by multithreaded access to the database. Can
> > you provide any guidance on how to debug this problem?
> Quoting the "Requirements" sections from libodb-sqlite's INSTALL file:
> "If you plan to access an SQLite database from multiple threads, then
> you will need SQLite version 3.5.0 or later built with the unlock notify
> feature (SQLITE_ENABLE_UNLOCK_NOTIFY) enabled."
> My guess would be the stock iOS SQLite is built without this feature.
> Normally, in this sutuation, one would use a custom build of SQLite.
> This earlier post has more details:
> http://www.codesynthesis.com/pipermail/odb-users/2014-November/002239.html
> Boris

More information about the odb-users mailing list