On 14 Jan 2016, at 1:42pm, Werner Kleiner <sqlitetester at gmail.com> wrote:
> The windows application is written in C# and uses the sqlite.systemData.dll. I'm sure someone here can tell you how to set a timeout in that. > What does the timeout mean in detail for sqlite ? > Is this time (in your example 5 minutes) for each SQL query which is > executed? SQLite contains its own backoff-and-retry procedure for use when the database is locked. By default the timeout value is 0 which means SQLite never gets to use it. But instead you can set a timout value. Then if SQLite tries the command and finds that the database is locked it will sleep a while, try again, sleep a little longer, try again, sleep even longer, try again ... and it will keep doing this until the timeout value has been reached. Only if it is still failing at that time will SQLite return SQLITE_BUSY or SQLITE_LOCKED. At that point the error is final, and there's no need to implement your own system for backoff-and-retry. Simon.