diff --git a/management/server/sql_store.go b/management/server/sql_store.go index b1b8330ba..646184578 100644 --- a/management/server/sql_store.go +++ b/management/server/sql_store.go @@ -69,9 +69,17 @@ func NewSqlStore(ctx context.Context, db *gorm.DB, storeEngine StoreEngine, metr if err != nil { conns = runtime.NumCPU() } + + if storeEngine == SqliteStoreEngine { + if err == nil { + log.WithContext(ctx).Warnf("setting NB_SQL_MAX_OPEN_CONNS is not supported for sqlite, using default value 1") + } + conns = 1 + } + sql.SetMaxOpenConns(conns) - log.Infof("Set max open db connections to %d", conns) + log.WithContext(ctx).Infof("Set max open db connections to %d", conns) if err := migrate(ctx, db); err != nil { return nil, fmt.Errorf("migrate: %w", err)