rietveld-codereview / rietveld

Code Review, hosted on Google App Engine
https://codereview.appspot.com
Apache License 2.0
557 stars 152 forks source link

Issue with closing idle DB connections automatically #571

Open satishchandra76 opened 5 years ago

satishchandra76 commented 5 years ago

We are using the database/sql package for interaction with MySQL DB along with golang MySQL driver. We are noticing that the idle connections are not getting closed even though they have exceeded the max number of allowed idle connections. Below are the settings that we are using in our application.

dbController.Db.SetConnMaxLifetime(time.Second*60); dbController.Db.SetMaxIdleConns(10); dbController.Db.SetMaxOpenConns(300);

Any help in this regard will be greatly appreciated.

Regards, Satish