Hacker News new | past | comments | ask | show | jobs | submit login

>> when more than one process need to acces the DB

> Easy, you use `journal_mode` set to `WAL` when you connect to the sqlite database.

and set isolation level and check_same_thread and PRAGMA synchronous and then put all queries in retry loops because the DB is maybe locked https://sqlite.org/wal.html#sometimes_queries_return_sqlite_...

I wasted so much time trying to get multiple sqlite queries running at the same time




> I wasted so much time trying to get multiple sqlite queries running at the same time

You were trying to write at the same time right?


no, although the DB was not opened readonly mode. I tested with apachebench with many parallel requests on endpoints using only SELECTs




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: