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: driver unexpectedly closing connections that should be returned to the pool #28495
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
@rchakra3 As to why there are sometimes 50 open connections, I would imagine sometimes an error is returned and or something times out and the connection is dropped.
database/sql, unlike other pools, connects to the database lazily and eagerly reuses connection. So that part makes sense.
I'm not sure why you have 200-400 connections in the TIME_WAIT state.
@kardianos @agnivade thanks for the details!
I'm closing this issue until I'm sure the client implementation isn't causing this behavior.