问题描述
我在Heroku上运行Resque,我的数据库是ClearDB.我收到此错误:
I am running Resque on Heroku, and my database is ClearDB. I am getting this error:
"Mysql2 :: Error:用户'bdb2aedbee2c38'已超出'max_user_connections'资源(当前值:10):从projects
显示完整字段"
"Mysql2::Error: User 'bdb2aedbee2c38' has exceeded the 'max_user_connections' resource (current value: 10): SHOW FULL FIELDS FROM projects
"
该错误来自我的Heroku应用程序的Resque管理员.
That error is coming from my Resque admin of my Heroku app.
如何确定Resque与ClearDB进行了多少连接?
How can I figure out how many connections Resque is making to ClearDB?
如何告诉ClearDB允许更多连接,或告诉Resque创建更少连接?
How can I tell ClearDB to either allow more connections, or tell Resque to create less?
当前值:10"是指ClearDB允许多少个连接,还是Resque试图建立的当前多少个连接?
Does "current value: 10" refer to how many connections ClearDB is allowing, or is this how many current connections Resque is trying to make?
谢谢!
推荐答案
您的应用程序服务器dynos或Resque worker正在消耗比数据库计划提供的更多的连接.
Your application server dynos or Resque workers are consuming more connections than your database plan provides.
您有两个选择:
- 通过升级到更高的ClearDB计划来扩展数据库( http://dashboard.heroku.com )
- 通过减少dynos/workers的数量(
heroku ps:scale
命令)来缩小您的应用程序
- Scale up your database by upgrading to a higher ClearDB plan (http://dashboard.heroku.com)
- Scale down your application by reducing the number of dynos/workers (
heroku ps:scale
command)
当我在您的附加组件上进行Google搜索时,第一个链接指向描述服务和定价层的页面.您位于10个免费连接层.
The first link when I googled your addons links to the page describing the service and pricing tiers. You are on the free, 10 connection tier.
https://addons.heroku.com/cleardb
这篇关于Resque Mysql2 :: Error:用户已超出' max_user_connections'资源(当前值:10)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!