When I use gorm v2, I find that the connection life of v2 seems to be only 1 second, and when a connection is not used for more than 1 second, it will be destroyed, so it seems time-consuming to create a connection each time, and it takes about 100ms to create a connection. Can you solve this problem through configuration? None of the following configurations worked for me ```go s, err := db.DB() s.SetMaxOpenConns(100) s.SetMaxIdleConns(100) s.SetConnMaxIdleTime(time.Hour) s.SetConnMaxLifetime(time.Hour) ```` But I did not find this problem in the gorm-v1, v1 can reuse the previous connection, will not destroy the connection after a second The specific code is shown below
The first image is gorm v1, this query just use little time.
The second diagram shows that connections can be reused when I use an interval of 0.5 seconds
The third diagram shows that when I use the 1 second interval, I can't reuse the connection, and gorm helps me re-create the connection
The fourth diagram shows that the configuration does not work
Comment From: github-actions[bot]
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking ✨
Comment From: github-actions[bot]
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking ✨
Comment From: github-actions[bot]
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking ✨