Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/jujuPublic

Commit88f75e6

Browse files
authored
Merge pull request#21116 from manadart/dqlite-bump-conn-pool
feat: add one to the tracker connection pools
2 parentsde61bb3 +918ad05 commit88f75e6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎internal/worker/dbaccessor/tracker.go‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -529,14 +529,14 @@ func jitter(interval time.Duration, factor float64) time.Duration {
529529

530530
funcapplyDBLimits(db*sql.DB) {
531531
// Set the maximum number of idle and open connections to be the same and
532-
// set to2 (default is 0 for MaxOpenConns). From testing, it's better to
532+
// set to3 (default is 0 for MaxOpenConns). From testing, it's better to
533533
// have both set to the same value, and not setting these values can lead to
534534
// a large number of open connections being created and not closed, which
535535
// can lead to unbounded connections.
536536
//
537-
// If and when we change this number, be aware that a database will have2
537+
// If and when we change this number, be aware that a database will have3
538538
// connections per database, per dqlite App. So if we have 100 databases
539-
// then that is200 connections per dqlite App. Changing that number to
539+
// then that is300 connections per dqlite App. Changing that number to
540540
// match runtime.GOMAXPROCS will then be len(database) * runtime.GOMAXPROCS
541541
// per dqlite App. This can lead to a lot of open connections, so be
542542
// careful.
@@ -545,6 +545,6 @@ func applyDBLimits(db *sql.DB) {
545545
// dqlite App will be less because the number of databases per dqlite App
546546
// will be less. Testing will need to be done to determine the best number
547547
// for this.
548-
db.SetMaxIdleConns(2)
549-
db.SetMaxOpenConns(2)
548+
db.SetMaxIdleConns(3)
549+
db.SetMaxOpenConns(3)
550550
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp