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: db.PingContext takes longer to time out on certain database host IPs than on others (postgresql and mysql) #27476
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
It seems that in https://github.com/golang/go/blob/master/src/database/sql/sql.go#L1177:
It won't respect ctx if make a connection request at last.
The mysql driver has two pull requests to support the Connector. Nothing merged as of yet.
The postgresql driver supports the connector interface, but discards the context passed in. https://github.com/lib/pq/blob/90697d60dd844d5ef6ff15135d0203f65d2f53b8/connector.go#L23
I'm closing this issue as there is nothing to be done.