SQLite Forum

Unexepected commit result with two threads application
Login
> `SQLITE_BUSY`, `sqlite3_get_autocommit()`: 0

It looks like you have explicitly started a transaction (which disables autocommit). The [documentation for `sqlite3_step()`](https://sqlite.org/c3ref/step.html) says:

> `SQLITE_BUSY` means that the database engine was unable to acquire the database locks it needs to do its job. <...> If the statement is not a COMMIT and occurs within an explicit transaction then you should rollback the transaction before continuing.

Perhaps this `SQLITE_BUSY` shouldn't be retried?