From 0b8efa6313b6cc27b617f64e908594966beda0dc Mon Sep 17 00:00:00 2001 From: Tudor Malene Date: Fri, 26 Jan 2024 18:40:16 +0000 Subject: [PATCH] set max conn --- go/enclave/storage/init/edgelessdb/edgelessdb.go | 1 + 1 file changed, 1 insertion(+) diff --git a/go/enclave/storage/init/edgelessdb/edgelessdb.go b/go/enclave/storage/init/edgelessdb/edgelessdb.go index dc20537b65..04ac39c590 100644 --- a/go/enclave/storage/init/edgelessdb/edgelessdb.go +++ b/go/enclave/storage/init/edgelessdb/edgelessdb.go @@ -467,6 +467,7 @@ func connectToEdgelessDB(edbHost string, tlsCfg *tls.Config, logger gethlog.Logg dsn := cfg.FormatDSN() logger.Info(fmt.Sprintf("Configuring mysql connection: %s", dsn)) db, err := sql.Open("mysql", dsn) + db.SetMaxOpenConns(50) if err != nil { return nil, fmt.Errorf("failed to initialize mysql connection to edb - %w", err) }