Resque Mysql2::Error: User has exceeded the 'max_user_connections' resource (current value: 10)

和自甴很熟 提交于 2019-12-30 10:59:07

问题


I am running Resque on Heroku, and my database is ClearDB. I am getting this error:

"Mysql2::Error: User 'bdb2aedbee2c38' has exceeded the 'max_user_connections' resource (current value: 10): SHOW FULL FIELDS FROM projects"

That error is coming from my Resque admin of my Heroku app.

How can I figure out how many connections Resque is making to ClearDB?

How can I tell ClearDB to either allow more connections, or tell Resque to create less?

Does "current value: 10" refer to how many connections ClearDB is allowing, or is this how many current connections Resque is trying to make?

Thanks!


回答1:


Your application server dynos or Resque workers are consuming more connections than your database plan provides.

You have two options:

  • 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)

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



来源:https://stackoverflow.com/questions/17937390/resque-mysql2error-user-has-exceeded-the-max-user-connections-resource-cur

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!