Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Even if you are running it all on the same machine, a separate worker queue process and a web server process cannot share an SQLite database file.

From SQLite’s FAQ page, yes they can [0]. Two processes cannot simultaneously write to it, but they can both have it open, and read. With a modicum of tuning and application error handling, you can quite easily have multiple processes writing.

> …you really need to start engineering your infrastructure because you have actual trade offs.

Step one is fully understanding the abilities and limitations of available tooling.

[0]: https://www.sqlite.org/faq.html



Correct. You cannot have concurrent writers even to two independent tables. That page also clearly states the limitations of even this global lock system. I should have been more precise with my language in that while it’s possible it functionally can get to being useless pretty quickly.

SQLite is a wonderful database engine. But it isn’t the end all be all and no it doesn’t scale in the same way as something like Postgres. You cannot stretch it but you hit diminishing returns fairly quickly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: