mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-13 10:21:10 +01:00
hard limit of 1 for sqlite max conn
This commit is contained in:
parent
b2379175fe
commit
56af98b5b4
@ -69,6 +69,11 @@ func NewSqlStore(ctx context.Context, db *gorm.DB, storeEngine StoreEngine, metr
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
conns = runtime.NumCPU()
|
conns = runtime.NumCPU()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if storeEngine == SqliteStoreEngine {
|
||||||
|
conns = 1
|
||||||
|
}
|
||||||
|
|
||||||
sql.SetMaxOpenConns(conns)
|
sql.SetMaxOpenConns(conns)
|
||||||
|
|
||||||
log.Infof("Set max open db connections to %d", conns)
|
log.Infof("Set max open db connections to %d", conns)
|
||||||
|
Loading…
Reference in New Issue
Block a user