Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit 9942e21

Browse files
lowang-bhwanglonghui7
and
wanglonghui7
authored
Fix readme: MaxIdle is same or less than MaxOpen (go-sql-driver#1215)
Co-authored-by: wanglonghui7 <[email protected]>
1 parent b36cd86 commit 9942e21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ db.SetMaxIdleConns(10)
8585

8686
`db.SetMaxOpenConns()` is highly recommended to limit the number of connection used by the application. There is no recommended limit number because it depends on application and MySQL server.
8787

88-
`db.SetMaxIdleConns()` is recommended to be set same to (or greater than) `db.SetMaxOpenConns()`. When it is smaller than `SetMaxOpenConns()`, connections can be opened and closed very frequently than you expect. Idle connections can be closed by the `db.SetConnMaxLifetime()`. If you want to close idle connections more rapidly, you can use `db.SetConnMaxIdleTime()` since Go 1.15.
88+
`db.SetMaxIdleConns()` is recommended to be set same to `db.SetMaxOpenConns()`. When it is smaller than `SetMaxOpenConns()`, connections can be opened and closed very frequently than you expect. Idle connections can be closed by the `db.SetConnMaxLifetime()`. If you want to close idle connections more rapidly, you can use `db.SetConnMaxIdleTime()` since Go 1.15.
8989

9090

9191
### DSN (Data Source Name)

0 commit comments

Comments
 (0)