Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 4 of 4 for SetMaxOpenConns (0.2 seconds)

  1. tests/prepared_stmt_test.go

    	AssertEqual(t, len(conn.Stmts.Keys()), 0)
    
    }
    
    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)
    
    Created: Sun Dec 28 09:35:17 GMT 2025
    - Last Modified: Fri Apr 25 08:22:26 GMT 2025
    - 8K bytes
    - Click Count (0)
  2. 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())
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Sun Mar 30 00:56:02 GMT 2025
    - 11.6K bytes
    - Click Count (0)
  3. 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())
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Sun Mar 30 00:56:02 GMT 2025
    - 13.3K bytes
    - Click Count (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 }
    Created: Tue Dec 30 11:13:12 GMT 2025
    - Last Modified: Fri Oct 18 04:36:59 GMT 2013
    - 1.9M bytes
    - Click Count (1)
Back to Top