Skip to content

Commit

Permalink
add maxDbPoolSize for edglessdb (#1767)
Browse files Browse the repository at this point in the history
* add maxDbPoolSize for edglessdb

* lint
  • Loading branch information
tudor-malene authored Jan 30, 2024
1 parent 42d9a38 commit 6a7b5f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions go/enclave/storage/init/edgelessdb/edgelessdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ const (
debugMode = false

initFile = "001_init.sql"

// maximum number of database connections maintained in the tx pool
maxDBPoolSize = 100
)

var (
Expand Down Expand Up @@ -470,5 +473,6 @@ func connectToEdgelessDB(edbHost string, tlsCfg *tls.Config, logger gethlog.Logg
if err != nil {
return nil, fmt.Errorf("failed to initialize mysql connection to edb - %w", err)
}
db.SetMaxOpenConns(maxDBPoolSize)
return db, nil
}

0 comments on commit 6a7b5f5

Please sign in to comment.