2019-04-24 15:52:26.526 9818 ERROR oslo_messaging.rpc.server [req-857fec8a-7196-4425-85e4-389e2655a2c3 - - - - -] Exception during message handling: OperationalError: (pymysql.err.OperationalError) (1040, u'Too many connections') (Background on this error at: http://sqlalche.me/e/e3q8)
我用过
"github.com/astaxie/beego/orm"
mariaDB
我可以增加连接数。但是,如果我们退出网站,有什么办法可以断开我的连接。还有其他使用更好的 beego+mariadb 的建议吗?
最佳答案
- 减少
wait_timeout
。 - 减少客户端数量(例如 Apache,默认数量太大)
- 检查您可能正在使用的“持久连接”和“连接池”。
关于mysql - 如何避免 "too many connections",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55826624/