From 1ee26579a231cfb23bd68da8012c057906862306 Mon Sep 17 00:00:00 2001 From: John Chadwick Date: Sun, 25 Jun 2023 11:56:47 -0400 Subject: [PATCH] minibox: do not open multiple sessions to sqlite --- minibox/minibox.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/minibox/minibox.go b/minibox/minibox.go index f06476e..96e341c 100644 --- a/minibox/minibox.go +++ b/minibox/minibox.go @@ -165,6 +165,8 @@ func (server *Server) ConfigureDatabase(opts DataOptions) error { return fmt.Errorf("setting up database: %w", err) } + db.SetMaxOpenConns(1) + server.accountsService = accounts.NewService(accounts.Options{ Database: db, Hasher: hash.Bcrypt{},