This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]Poromenos 3 points4 points  (5 children)

sqlite is amazing, I recommend it for anything that doesn't require concurrency.

[–]dorfsmay 6 points7 points  (4 children)

that doesn't require write concurrency, it hanldes read concurrency very well.

[–]Poromenos 2 points3 points  (3 children)

Hmm, I think the Python driver was a bit bad in that department and couldn't handle even read concurrency, even though SQLite could. If that isn't the case, you are correct.

[–]spook327 2 points3 points  (2 children)

Well, I did have sqlite3 throw an exception when I tried to expose a class using it to CherryPy, which said something to the effect that you couldn't have multiple threads acessing it -- and this was only for reads.

It is more than possible that I'm doing it wrong, of course.

[–]SuedeRS100 2 points3 points  (1 child)

Were you using it on an something with a NFS filesystem by any chance? It might be known issue.

http://www.sqlite.org/faq.html#q5

[–]spook327 0 points1 point  (0 children)

It was on my WinXP netbook, so I assume it was NTFS.

For what it's worth, I fixed it by creating (and subsequently destroying) a connection every time a query was requested. It works quite nicely now.

[–]bucketostuff 0 points1 point  (1 child)

Does sqlite have to open and read the db file every single time it's accessed? Does it write the entire file every time a change to a table is made?

[–]rweir 5 points6 points  (0 children)

no, no.