Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
database/sql: dynamic reduce the connection pool size #9453
DB.SetMaxOpenConns could reduce the connection pool size, but the unnecssary connections won't close until DB's free connection size >= DB's idle connections size.
That is to say, when the pool is busy (lots of requests), the unnecessary connections won't be closed.
detailed discussion on golang-nuts
my patch to src/database/sql/sql.go
To contribute a fix to Go,
-- See https://golang.org/doc/contribute.html on how to use Gerrit & git-codereview (we don't take or comment on patches on the issue tracker or in pull requests)