I'm getting this error consistently with my Rails site on Heroku using ClearDB mySQL.
Mysql2::Error: User '123123' has exceeded the 'max_questions' resource
(current value: 18000)
Looking at the logs, the exceptions are returning for normal ActiveRecord finds. One of the exceptions is complaining about a scope in a model concern.
ActiveRecord::StatementInvalid: Mysql2::Error: User '123123'
has exceeded the 'max_questions' resource (current value: 36000): SET
@@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'),
',NO_AUTO_VALUE_ON_ZERO'), @@SESSION.sql_auto_is_null = 0,
@@SESSION.wait_timeout = 2147483
I'm on the Punch plan. The site isn't getting much traffic at all. Around 100 visits a day. Is there something I'm not configuring correctly within Rails or Heroku to avoid this error?
Update: Moved to next plan higher and still getting these exceptions.
If you receive this message, it means that you have reached your connection limit for the plan for which you are currently subscribed. We recommend that you upgrade your database to a larger plan to lift this restriction off of your database.
ClearDB is a powerful, high-speed database-as-a-service in the cloud for your MySQL powered applications.
In heroku website, go to My Apps and select the app on which you have installed ClearDB. On the top corner click on Addons and then select ClearDB MySQL Database. Once there, click on your database and choose the 'Endpoint Information' tab. There you see your username/password.
Heroku does not offer a native MySQL add-on but instead supplies it through a third party, ClearDB. If it has not been added to your application already, you can install it from the Heroku Add-Ons Page. Once installed, it will appear in your Add-Ons list in your Resources tab as ClearDB MySQL .
Actually, this seems to be a problem with number of queries per hour. You have max 36000 questions (queries) each hour and your application exceeded the limit. There is possibility, you have an unhandled loop or logic error in your query.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With