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.