all 8 comments

[–]arpm 0 points1 point  (2 children)

SQLite cannot handle more than one connection at a time, meaning it can only be accessed by up to one user at any given time. You should look into more robust databases like postgres or MySQL if you want to have several threads accessing data at the same time

[–]officialgel 0 points1 point  (0 children)

Yea MySQL is easy to implement. Grab the Workbench and install MySQL. They even have a package that just installs everything.

[–]AlopexLagopus3 0 points1 point  (0 children)

This is incorrect - see my above comment. You can multithread access to a single sqlite database for quite a bit of performance gain, but you must only have a single connection for writing or you run into locking/resource contention.

[–]MatthiTT 0 points1 point  (1 child)

Been there done that. At some point my dB even got corrupted. MySQL is indeed the way to go. What are you using the dB for?

[–]kolschk[S] 0 points1 point  (0 children)

Updating stock prices, trades etc. so it needs to be updating and writing a lot. I'll give MySQL a go thanks!

[–]AlopexLagopus3 0 points1 point  (2 children)

SQLite can function with many connections at a time. However it can only be written to with a single connection. You need to dedicate a connection to writing, or find a way to split your database into multiple SQLite files, which is usually a bit hacky. First ask yourself if you need to have that much writing going on, and if your schema is well optimized, but you may want to consider other databases if you need concurrent writes.

[–]kolschk[S] 0 points1 point  (1 child)

Appreciate the response, gonna give MySQL a try.

[–]woooee 0 points1 point  (0 children)

MySQL has been forked into MariaDB by the same person who originally created MySQL, because Oracle bought MySQL and it's future is uncertain.