Skip to content
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

similar issue to #39 #50

Closed
etherbob opened this issue May 14, 2014 · 9 comments
Closed

similar issue to #39 #50

etherbob opened this issue May 14, 2014 · 9 comments

Comments

@etherbob
Copy link

Rails 4.0.3 and Ruby 2.1.0 if I switch back to Ruby 2.0 or earlier it goes away. I will add more detail as I get it but wanted to let you know it's not an isolated issue.

@mnelson
Copy link
Contributor

mnelson commented May 14, 2014

Thanks, provide as much relevant info as possible and I'll revisit.

@etherbob
Copy link
Author

log

SystemStackError (stack level too deep):
  actionpack (4.0.3) lib/action_dispatch/middleware/reloader.rb:70


  Rendered /Users/user/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.3/lib/action_dispatch/middleware/templates/rescues/_source.erb (0.5ms)
  Rendered /Users/user/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.7ms)
  Rendered /Users/user/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.6ms)
  Rendered /Users/user/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.3/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (13.7ms)

framework trace

activerecord (4.0.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `block in wait_poll'
activerecord (4.0.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:181:in `loop'
activerecord (4.0.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:181:in `wait_poll'
activerecord (4.0.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:136:in `block in poll'
/Users/user/.rbenv/versions/2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
activerecord (4.0.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:146:in `synchronize'
activerecord (4.0.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:134:in `poll'
activerecord (4.0.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:423:in `acquire_connection'
activerecord (4.0.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:356:in `block in checkout'
/Users/user/.rbenv/versions/2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
activerecord (4.0.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in `checkout'
activerecord (4.0.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in `block in connection'
/Users/user/.rbenv/versions/2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
activerecord (4.0.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in `connection'
activerecord (4.0.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:546:in `retrieve_connection'
activerecord (4.0.3) lib/active_record/connection_handling.rb:79:in `retrieve_connection'
activerecord (4.0.3) lib/active_record/connection_handling.rb:53:in `connection'
activerecord (4.0.3) lib/active_record/query_cache.rb:51:in `restore_query_cache_settings'
activerecord (4.0.3) lib/active_record/query_cache.rb:43:in `rescue in call'
activerecord (4.0.3) lib/active_record/query_cache.rb:32:in `call'
activerecord (4.0.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
activerecord (4.0.3) lib/active_record/migration.rb:369:in `call'
actionpack (4.0.3) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.0.3) lib/active_support/callbacks.rb:373:in `_run__3371203646912226988__call__callbacks'
activesupport (4.0.3) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.3) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.0.3) lib/action_dispatch/middleware/reloader.rb:64:in `call'
actionpack (4.0.3) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
actionpack (4.0.3) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.0.3) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.0.3) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.3) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.0.3) lib/active_support/tagged_logging.rb:67:in `block in tagged'
activesupport (4.0.3) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.3) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.3) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.0.3) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.0.3) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
actionpack (4.0.3) lib/action_dispatch/middleware/static.rb:64:in `call'
rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
railties (4.0.3) lib/rails/engine.rb:511:in `call'
railties (4.0.3) lib/rails/application.rb:97:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
thin (1.6.2) lib/thin/connection.rb:86:in `block in pre_process'
thin (1.6.2) lib/thin/connection.rb:84:in `catch'
thin (1.6.2) lib/thin/connection.rb:84:in `pre_process'
thin (1.6.2) lib/thin/connection.rb:53:in `process'
thin (1.6.2) lib/thin/connection.rb:39:in `receive_data'
eventmachine (1.0.3) lib/eventmachine.rb:187:in `run_machine'
eventmachine (1.0.3) lib/eventmachine.rb:187:in `run'
thin (1.6.2) lib/thin/backends/base.rb:73:in `start'
thin (1.6.2) lib/thin/server.rb:162:in `start'
rack (1.5.2) lib/rack/handler/thin.rb:16:in `run'
rack (1.5.2) lib/rack/server.rb:264:in `start'
railties (4.0.3) lib/rails/commands/server.rb:84:in `start'
railties (4.0.3) lib/rails/commands.rb:76:in `block in <top (required)>'
railties (4.0.3) lib/rails/commands.rb:71:in `tap'
railties (4.0.3) lib/rails/commands.rb:71:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'

@etherbob
Copy link
Author

db config with a few details removed:

development:
  adapter: makara_mysql2
  encoding: utf8
  database: app_name
  pool: 5
  username: •
  password: •
  host: db1
  makara:

    # the following are default values
    blacklist_duration: 30
    master_ttl: 5
    sticky: true
    rescue_connection_failures: true

    # list your connections with the override values (they're merged into the top-level config)
    # be sure to provide the role if master, role is assumed to be a slave if not provided
    connections:
      - role: master
        host: db1
      - host: db2
        username: •
        password: •
      - host: db3
        username: •
        password: •

@etherbob
Copy link
Author

I can trigger it by putting in bogus credentials or taking one of my test databases down.

Using v0.2.2

@mnelson
Copy link
Contributor

mnelson commented May 14, 2014

I'll setup a similar environment soon but can you try doing rescue_connection_failures: false and see if it still occurs? Basically just trying to determine if it's the instantiation of a connection, the reconnection, or both. Based on your last comment I'm assuming it's both.

@etherbob
Copy link
Author

get similar error with rescue_connection_failures: false

actionpack (4.0.5) lib/action_dispatch/middleware/reloader.rb:70

Also tried updating to rails 4.0.5 to see if that helped in any way, but no dice. Everything continues to work in 2.0.0-p353 and 1.9.3-p448.

@etherbob
Copy link
Author

just to be clear:

When running with ruby 2.1.0 and rails 4.0.3 or rails 4.0.5
when a connection fails for any reason, it enters that loop.

@kithokit
Copy link

i looks like got the same issue...

@mnelson
Copy link
Contributor

mnelson commented Aug 5, 2014

@etherbob v0.3.0.rc1 is released. If that release fixes these issues please close the issue. If not, let me know. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants