- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for SetMaxOpenConns (0.21 sec)
-
tests/prepared_stmt_test.go
} tx2.Commit() } func TestPreparedStmtDeadlock(t *testing.T) { tx, err := OpenTestConnection(&gorm.Config{}) AssertEqual(t, err, nil) sqlDB, _ := tx.DB() sqlDB.SetMaxOpenConns(1) tx = tx.Session(&gorm.Session{PrepareStmt: true}) wg := sync.WaitGroup{} for i := 0; i < 100; i++ { wg.Add(1) go func() { user := User{Name: "jinzhu"} tx.Create(&user)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:02:05 UTC 2024 - 8.5K bytes - Viewed (0) -
internal/event/target/postgresql.go
db, err := sql.Open("postgres", target.connString) if err != nil { return err } target.db = db if args.MaxOpenConnections > 0 { // Set the maximum connections limit target.db.SetMaxOpenConns(args.MaxOpenConnections) } err = target.db.Ping() if err != nil { if !(xnet.IsConnRefusedErr(err) || xnet.IsConnResetErr(err)) { target.loggerOnce(context.Background(), err, target.ID().String())
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 13.3K bytes - Viewed (0) -
internal/event/target/mysql.go
target.loggerOnce(context.Background(), err, target.ID().String()) return err } target.db = db if args.MaxOpenConnections > 0 { // Set the maximum connections limit target.db.SetMaxOpenConns(args.MaxOpenConnections) } err = target.db.Ping() if err != nil { if !(xnet.IsConnRefusedErr(err) || xnet.IsConnResetErr(err)) { target.loggerOnce(context.Background(), err, target.ID().String())
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 11.6K bytes - Viewed (0)