[sqlite] Could frequent 'database is locked' errors mean SQLite is not a good fit for my application?

2015-07-03 Thread Teg
Hello Kathleen, I'd set it to 5 minutes and see what happens. The timeout is worst case. It's not going to slow normal processing. I use infinite here. Is there ever a situation where you don't want to wait for it to finish? If you have hard real time requirements. I'd probably re-design it to be

[sqlite] Could frequent 'database is locked' errors mean SQLite is not a good fit for my application?

2015-07-03 Thread purch...@bilney.co.uk
Hi, I'm not an expert on bash or scripts etc. However, if I were doing something similar in C++ then I'd consider having a dedicated thread to manage a queue of dB operations and committing them all from this single thread. You can then take control of a whole host of things - maintaining the

[sqlite] Could frequent 'database is locked' errors mean SQLite is not a good fit for my application?

2015-07-03 Thread Simon Slavin
On 2 Jul 2015, at 3:59pm, Kathleen Alexander wrote: > I don't explicitly set sqlite3_busy_timeout(sqlite3*, int ms) so I will try > adding that after the database connection is opened to see if it limits > those errors. This will have an extreme effect. The default timeout for SQLite is not

[sqlite] Could frequent 'database is locked' errors mean SQLite is not a good fit for my application?

2015-07-02 Thread Kathleen Alexander
Thanks so much for the help. I set the timeout to 5 seconds (at each instance of a db open connection) and was still seeing the database locked errors with some frequency (haven't quantified it yet), so I will try extending it to 30 seconds, as you suggest, and hopefully that makes a difference.

[sqlite] Could frequent 'database is locked' errors mean SQLite is not a good fit for my application?

2015-07-02 Thread Igor Korot
Hi, Kathleen, On Thu, Jul 2, 2015 at 5:34 PM, James K. Lowden wrote: > On Thu, 2 Jul 2015 10:09:12 -0400 > Kathleen Alexander wrote: > >> Essentially, I have written an application in C++ that interfaces >> (reads and writes) with a SQLite database, and I am getting lots of >> 'database is

[sqlite] Could frequent 'database is locked' errors mean SQLite is not a good fit for my application?

2015-07-02 Thread James K. Lowden
On Thu, 2 Jul 2015 10:09:12 -0400 Kathleen Alexander wrote: > Essentially, I have written an application in C++ that interfaces > (reads and writes) with a SQLite database, and I am getting lots of > 'database is locked' errors. [...] > > My application runs on Linux (ubuntu 13.10), and is

[sqlite] Could frequent 'database is locked' errors mean SQLite is not a good fit for my application?

2015-07-02 Thread Simon Davies
On 2 July 2015 at 15:09, Kathleen Alexander wrote: > Hi, > > I apologize if this is an incorrect forum for this question, but I am > pretty new to SQLite and have been unable to resolve this issue through > other searches. Feel free to direct me to a more appropriate forum. > > Essentially, I

[sqlite] Could frequent 'database is locked' errors mean SQLite is not a good fit for my application?

2015-07-02 Thread Kathleen Alexander
Hi Adam, Thank you very much for your response. I had not considered using copies of the database. In my method there are cases where writes to the database by one process may be relevant to another process, so I'm not sure that that would be a good option. I don't explicitly set

[sqlite] Could frequent 'database is locked' errors mean SQLite is not a good fit for my application?

2015-07-02 Thread Adam Devita
Good day, I'm sure others on the list will add better insight, but is your task parallel enough that your nodes can work with a copy of the database and submit changes the one the others copy from when 'done' their calculation? Are you using https://www.sqlite.org/c3ref/busy_timeout.html ?

[sqlite] Could frequent 'database is locked' errors mean SQLite is not a good fit for my application?

2015-07-02 Thread Kathleen Alexander
Hi, I apologize if this is an incorrect forum for this question, but I am pretty new to SQLite and have been unable to resolve this issue through other searches. Feel free to direct me to a more appropriate forum. Essentially, I have written an application in C++ that interfaces (reads and

[sqlite] Could frequent 'database is locked' errors mean SQLite is not a good fit for my application?

2015-07-02 Thread Jim Morris
If you are not using WAL mode that might help. On 7/2/2015 7:59 AM, Kathleen Alexander wrote: > Hi Adam, > > Thank you very much for your response. I had not considered using copies of > the database. In my method there are cases where writes to the database by > one process may be relevant to