GoatCounter v1.3.1 Release Notes
Release Date: 2020-07-04 // almost 4 years ago-
๐ Fixes for SQLite concurrency issues
In some busy workloads various SQLite operations would fail due to "locked tables"; most of this is related to the session code:
- ๐ On every pageview a new session is either read (OK) or written (LOCK!)
- ๐ At the same time, the cron may be writing data to the db (LOCK!)
๐ On smaller instances this isn't much of an issue since everything is fast enough to not lock for too long, but on longer instances this can be a problem.
Setting SetMaxOpenConns(1) solves this by limiting the connections writing to the database.
๐ Also set the default journal mode to WAL, which should give better performance. Both of this is done in the zgo.at/zdb update.
โ Add "goatcounter help db" to document database usage a bit better.