Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for SetMaxOpenConns (0.56 sec)

  1. 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)
  2. 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)
  3. 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)
  4. api/go1.2.txt

    pkg crypto/x509, type Certificate struct, IssuingCertificateURL []string
    pkg crypto/x509, type Certificate struct, OCSPServer []string
    pkg database/sql, method (*DB) SetMaxOpenConns(int)
    pkg encoding, type BinaryMarshaler interface { MarshalBinary }
    pkg encoding, type BinaryMarshaler interface, MarshalBinary() ([]uint8, error)
    pkg encoding, type BinaryUnmarshaler interface { UnmarshalBinary }
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Oct 18 04:36:59 UTC 2013
    - 1.9M bytes
    - Viewed (0)
Back to top