hard limit of 1 for sqlite max conn

This commit is contained in:
Pascal Fischer 2024-10-10 16:25:54 +02:00
parent b2379175fe
commit 56af98b5b4

View File

@ -69,6 +69,11 @@ func NewSqlStore(ctx context.Context, db *gorm.DB, storeEngine StoreEngine, metr
if err != nil {
conns = runtime.NumCPU()
}
if storeEngine == SqliteStoreEngine {
conns = 1
}
sql.SetMaxOpenConns(conns)
log.Infof("Set max open db connections to %d", conns)