-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
连接PgSql时,DisableAutomaticPing设置为true,但还是会触发--ping命令,并且连接不断开,导致连接数一直在增加 #7196
Comments
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 |
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 |
实现了一个测试demo |
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 |
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 |
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 |
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 |
@meichuanneiku 你这样提issue的方式是不正确的,你提的demo也应该是纯gorm就可以复现的问题,而不是给出一个使用复杂的巨型框架的demo代码(并且里面还没有明显的gorm是如何连接的说明)。 |
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 |
场景:
在使用go-kratos框架中实现一个定时任务,该任务会查询pgsql中的数据,因此会在项目启动时创建pgsql的连接,在连接的配置信息中DisableAutomaticPing设置为true,企图关闭自动ping的功能
问题:
但在运行一段时间(大概1天),发现pg数据库无法连接,就查询数据库的连接状态,发现--ping命令的连接未断开并且数量还一直在增加。之后就尝试修改连接池的数量,不管修改多少,问题仍然存在
使用版本:
go:1.22.4
gorm: 1.25.12
查询数据库连接状态截图:
示例代码项目:
https://github.com/meichuanneiku/connentgorm.git
The text was updated successfully, but these errors were encountered: