From 2e591dd5b200005427e7512ac9a4afd45549e323 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Wed, 19 Feb 2020 17:23:36 +0000 Subject: [PATCH] sqlite: let's just ignore the problem for now.... --- roomserver/storage/sqlite3/storage.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/roomserver/storage/sqlite3/storage.go b/roomserver/storage/sqlite3/storage.go index 125969fb3..82c5ed3d2 100644 --- a/roomserver/storage/sqlite3/storage.go +++ b/roomserver/storage/sqlite3/storage.go @@ -54,7 +54,12 @@ func Open(dataSourceName string) (*Database, error) { } //d.db.Exec("PRAGMA journal_mode=WAL;") //d.db.Exec("PRAGMA read_uncommitted = true;") - d.db.SetMaxOpenConns(2) + + // FIXME: We are leaking connections somewhere. Setting this to 2 will eventually + // cause the roomserver to be unresponsive to new events because something will + // acquire the global mutex and never unlock it because it is waiting for a connection + // which it will never obtain. + d.db.SetMaxOpenConns(20) if err = d.statements.prepare(d.db); err != nil { return nil, err }