Homewrite.as

Fix SQLite concurrency issues

Authored by matt on Dec 3 2018, 2:53 PM.

Description

Fix SQLite concurrency issues

A quick test with ApacheBench revealed that SQLite really can't handle
multiple concurrent requests with the default settings, due to a locked
database. This fixes that by following the suggestions here:
https://github.com/mattn/go-sqlite3#faq

Testing with ab -n 100 -c 5 http://localhost:8080/blog/post shows that
this fixes the issue. But we could improve performance by reducing
writes, like what's mentioned in T545.

Part of T529

Details

Committed
mattDec 3 2018, 5:05 PM
Parents
rWF61de04338e1a: Extract out common DB connection logic
Branches
Unknown
Tags
Unknown