This required me to move the sqlite connection from a rwlock into mutex, since it isn't actually Sync.