Closed fabiospampinato closed 10 months ago
Make sure you're using WAL mode. If you've only got a couple processes and the database is <100Mb, you should be fine. Larger databases and 5+ processes with heavy write loads and I'd expect issues.
What kinds of issues? Like a corrupted database or what else exactly?
What kinds of issues? Like a corrupted database or what else exactly?
Performance issues. It's perfectly safe to access the same SQLite database from multiple processes, but performance may suffer if all processes are trying to write to the database at the same time.
Node has a cluster module for having multiple instances of an app share the same HTTP ports for example, to spread the load across multiple cores.
Is
better-sqlite3
safe to use under that environment? Asking just to be sure, as sometimes there are problems with these things.