Skip to content

Instantly share code, notes, and snippets.

@rickychilcott
Created February 23, 2022 00:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rickychilcott/49c98899a1689697aa3ed637f1160a61 to your computer and use it in GitHub Desktop.
Save rickychilcott/49c98899a1689697aa3ed637f1160a61 to your computer and use it in GitHub Desktop.
Thredded DB Pool Exhaustion Stacktrace
Feb 21 18:20:41 app-name app/web.1 #<Thread:0x00007fe73838ea10 /app/vendor/bundle/ruby/3.0.0/bundler/gems/thredded-9a7158d4a307/lib/thredded/collection_to_strings_with_cache_renderer.rb:84 run> terminated with exception (report_on_exception is true):
Feb 21 18:20:41 app-name app/web.1 /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:210:in `block in wait_poll': could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use (ActionView::Template::Error)
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:199:in `loop'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:199:in `wait_poll'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:160:in `internal_poll'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:286:in `internal_poll'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:155:in `block in poll'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/ruby-3.0.3/lib/ruby/3.0.0/monitor.rb:202:in `synchronize'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/ruby-3.0.3/lib/ruby/3.0.0/monitor.rb:202:in `mon_synchronize'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:164:in `synchronize'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:155:in `poll'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:870:in `acquire_connection'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:588:in `checkout'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:428:in `connection'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:1128:in `retrieve_connection'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/connection_handling.rb:327:in `retrieve_connection'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/connection_handling.rb:283:in `connection'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/relation/delegation.rb:93:in `connection'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/relation/query_methods.rb:1394:in `preprocess_order_args'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/relation/query_methods.rb:360:in `order!'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/relation/query_methods.rb:355:in `order'
Feb 21 18:20:41 app-name app/web.1 from /app/app/models/user.rb:83:in `block in <class:User>'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/scoping/default.rb:118:in `instance_exec'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/scoping/default.rb:118:in `block (2 levels) in build_default_scope'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/scoping/default.rb:116:in `each'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/scoping/default.rb:116:in `inject'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/scoping/default.rb:116:in `block in build_default_scope'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/scoping/default.rb:140:in `evaluate_default_scope'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/scoping/default.rb:115:in `build_default_scope'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/scoping/named.rb:46:in `default_scoped'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/scoping/named.rb:32:in `all'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/bundler/gems/thredded-9a7158d4a307/app/models/thredded/user_permissions/read/all.rb:28:in `thredded_messageboards_readers'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/bundler/gems/thredded-9a7158d4a307/app/models/thredded/post.rb:65:in `readers'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/bundler/gems/thredded-9a7158d4a307/app/models/concerns/thredded/post_common.rb:58:in `filtered_content'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/bundler/gems/thredded-9a7158d4a307/app/view_models/thredded/post_view.rb:6:in `filtered_content'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/bundler/gems/thredded-9a7158d4a307/app/views/thredded/posts_common/_content.html.erb:2:in `_vendor_bundle_ruby_______bundler_gems_thredded__a____d_a____app_views_thredded_posts_common__content_html_erb__674477801150984066_327480'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/base.rb:247:in `public_send'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/base.rb:247:in `_run'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/template.rb:154:in `block in render'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.6/lib/active_support/notifications.rb:203:in `block in instrument'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.6/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.6/lib/active_support/notifications.rb:203:in `instrument'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/template.rb:345:in `instrument_render_template'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/template.rb:152:in `render'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/rack-mini-profiler-2.3.3/lib/mini_profiler/profiling_methods.rb:85:in `block in profile_method'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/renderer/partial_renderer.rb:285:in `block in render_partial_template'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.6/lib/active_support/notifications.rb:203:in `block in instrument'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.6/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.6/lib/active_support/notifications.rb:203:in `instrument'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/renderer/partial_renderer.rb:280:in `render_partial_template'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/renderer/partial_renderer.rb:271:in `render'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/renderer/renderer.rb:81:in `render_partial_to_object'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/renderer/renderer.rb:53:in `render_partial'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/helpers/rendering_helper.rb:45:in `render'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/bundler/gems/thredded-9a7158d4a307/app/views/thredded/posts/_content.html.erb:1:in `_vendor_bundle_ruby_______bundler_gems_thredded__a____d_a____app_views_thredded_posts__content_html_erb___3572633902682452947_338840'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/base.rb:247:in `public_send'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/base.rb:247:in `_run'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/template.rb:154:in `block in render'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.6/lib/active_support/notifications.rb:203:in `block in instrument'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.6/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.6/lib/active_support/notifications.rb:203:in `instrument'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/template.rb:345:in `instrument_render_template'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/template.rb:152:in `render'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/rack-mini-profiler-2.3.3/lib/mini_profiler/profiling_methods.rb:85:in `block in profile_method'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/renderer/partial_renderer.rb:285:in `block in render_partial_template'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.6/lib/active_support/notifications.rb:203:in `block in instrument'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.6/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.6/lib/active_support/notifications.rb:203:in `instrument'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/renderer/partial_renderer.rb:280:in `render_partial_template'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/renderer/object_renderer.rb:31:in `render_partial_template'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/renderer/partial_renderer.rb:271:in `render'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/actionview-6.1.4.6/lib/action_view/renderer/object_renderer.rb:16:in `render_object_with_partial'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/bundler/gems/thredded-9a7158d4a307/lib/thredded/collection_to_strings_with_cache_renderer.rb:104:in `block in render_partials_serial'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/bundler/gems/thredded-9a7158d4a307/lib/thredded/collection_to_strings_with_cache_renderer.rb:102:in `map'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/bundler/gems/thredded-9a7158d4a307/lib/thredded/collection_to_strings_with_cache_renderer.rb:102:in `render_partials_serial'
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/bundler/gems/thredded-9a7158d4a307/lib/thredded/collection_to_strings_with_cache_renderer.rb:89:in `block (2 levels) in render_partials'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment