-
Notifications
You must be signed in to change notification settings - Fork 170
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
Makara::Errors::AllConnectionsBlacklisted #78
Comments
That error occurs when all connections had a failure related to connectivity within the blacklist duration. If you weren't using makara, it would be equivalent to seeing a connection error in newrelic. Are you able to provide the full trace and a summary of your database.yml? |
Our database.yml looks like this : adapter: 'makara_mysql2'
encoding: utf8
database: <%= ENV['RDS_DB_NAME'] %>
username: <%= ENV['RDS_USERNAME'] %>
password: <%= ENV['RDS_PASSWORD'] %>
host: <%= ENV['RDS_HOSTNAME'] %>
port: <%= ENV['RDS_PORT'] %>
pool: <%= ENV['DB_POOL'] %>
reaping_frequency: <%= ENV['REAPING_FREQUENCY'] %>
timeout: 5000
makara:
blacklist_duration: 5
master_ttl: 5
sticky: true
rescue_connection_failures: false
connections:
- role: master
host: <%= ENV['RDS_HOSTNAME'] %>
name: master-database
- role: slave
host: <%= ENV['DB_SLAVE1'] %>
name: read-slave1
weight: 5
- role: slave
host: <%= ENV['DB_SLAVE2'] %>
name: read-slave2
weight: 5 |
I get the same error when I only have one connection defined in the connection list, even when the connection is valid... eg
I wanted the slave to be optional, but it seems to fail with Makara::Errors::AllConnectionsBlacklisted unless > 1 connection is defined, is this a known issue? |
Same problem as @joelr. It would be great if Makara could behave as a "standard" adapter when there is only a master defined. One practical example is to set up a staging environment with the same adapter as production (i.e. Makara), but with only a single DB for saving cost. This allows to test easily (except, yes, this settings does not allow to test fail-overs!). @joelr: One dangerous workaround is to set a single machine as both master and slave. I did not check the source code yet, so please be aware this should be temporary (or confirmed as an OK workaround). A brief look at |
I'm going to combine this with this one (#101) -- I think they are both saying that master is special and especially if there is only one, there is something interesting that should happen where it works like "normal" - more investigating on that that means but "merging" them. |
Issue looks like similar to #36 , but in our case we are not stopping any of our slave or master database.
Stack trace from new relic is as follows :
….1/bundler/gems/makara-1ac718c7650c/lib/makara/
pool.rb: 95:in
provide' …1/bundler/gems/makara-1ac718c7650c/lib/makara/ proxy.rb: 69:in
method_missing'/usr/lib/ruby/1.9.1/
monitor.rb: 211:in
mon_synchronize' /usr/lib/ruby/1.9.1/ monitor.rb: 211:in
mon_synchronize'…_adapters/abstract/
connection_specification_changes.rb: 47:in
retrieve_connection' …_adapters/abstract/ connection_specification_changes.rb: 29:in
connection'What might have gone wrong in this case ?
Environment details
makara version : 'v0.2.2'
Rails version : 3.2.14
Ruby version : ruby 1.9.3p484
The text was updated successfully, but these errors were encountered: