Skip to content

Commit

Permalink
minibox: do not open multiple sessions to sqlite
Browse files Browse the repository at this point in the history
  • Loading branch information
jchv committed Jun 25, 2023
1 parent b04dfe0 commit 1ee2657
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions minibox/minibox.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{},
Expand Down

0 comments on commit 1ee2657

Please sign in to comment.