fjordllc / bootcamp

プログラマー向けEラーニングシステム
https://bootcamp.fjord.jp
MIT License
286 stars 71 forks source link

ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.001 seconds); all pooled connections were in use #8197

Open komagata opened 1 week ago

komagata commented 1 week ago

View details in Rollbar: https://app.rollbar.com/a/komagata/fix/item/Bootcamp/1757



ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.001 seconds); all pooled connections were in use
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/connection_adapters/abstract/connection_pool.rb", line 210, in block in wait_poll
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/connection_adapters/abstract/connection_pool.rb", line 199, in loop
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/connection_adapters/abstract/connection_pool.rb", line 199, in wait_poll
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/connection_adapters/abstract/connection_pool.rb", line 160, in internal_poll
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/connection_adapters/abstract/connection_pool.rb", line 286, in internal_poll
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/connection_adapters/abstract/connection_pool.rb", line 155, in block in poll
  File "/usr/local/lib/ruby/3.1.0/monitor.rb", line 202, in synchronize
  File "/usr/local/lib/ruby/3.1.0/monitor.rb", line 202, in mon_synchronize
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/connection_adapters/abstract/connection_pool.rb", line 164, in synchronize
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/connection_adapters/abstract/connection_pool.rb", line 155, in poll
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/connection_adapters/abstract/connection_pool.rb", line 870, in acquire_connection
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/connection_adapters/abstract/connection_pool.rb", line 588, in checkout
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/connection_adapters/abstract/connection_pool.rb", line 428, in connection
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/connection_adapters/abstract/connection_pool.rb", line 1128, in retrieve_connection
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/connection_handling.rb", line 327, in retrieve_connection
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/connection_handling.rb", line 283, in connection
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/model_schema.rb", line 380, in table_exists?
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/attribute_methods/primary_key.rb", line 95, in get_primary_key
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/attribute_methods/primary_key.rb", line 83, in reset_primary_key
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/attribute_methods/primary_key.rb", line 71, in primary_key
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/core.rb", line 325, in find
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/signed_id.rb", line 64, in find_signed!
  File "/usr/local/bundle/gems/activestorage-6.1.4.7/app/models/active_storage/blob.rb", line 86, in find_signed!
  File "/usr/local/bundle/gems/activestorage-6.1.4.7/app/controllers/concerns/active_storage/set_blob.rb", line 12, in set_blob
  File "/usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb", line 427, in block in make_lambda
  File "/usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb", line 198, in block (2 levels) in halting
  File "/usr/local/bundle/gems/actionpack-6.1.4.7/lib/abstract_controller/callbacks.rb", line 34, in block (2 levels) in <module:Callbacks>
  File "/usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb", line 199, in block in halting
  File "/usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb", line 512, in block in invoke_before
  File "/usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb", line 512, in each
  File "/usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb", line 512, in invoke_before
  File "/usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb", line 115, in block in run_callbacks
  File "/usr/local/bundle/gems/react-rails-3.1.1/lib/react/rails/controller_lifecycle.rb", line 33, in use_react_component_helper
  File "/usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb", line 126, in block in run_callbacks
  File "/usr/local/bundle/gems/active_decorator-1.4.1/lib/active_decorator/view_context.rb", line 37, in block (3 levels) in <module:Filter>
  File "/usr/local/bundle/gems/active_decorator-1.4.1/lib/active_decorator/view_context.rb", line 25, in run_with
  File "/usr/local/bundle/gems/active_decorator-1.4.1/lib/active_decorator/view_context.rb", line 36, in block (2 levels) in <module:Filter>
  File "/usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb", line 126, in instance_exec
  File "/usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb", line 126, in block in run_callbacks
  File "/usr/local/bundle/gems/actiontext-6.1.4.7/lib/action_text/rendering.rb", line 20, in with_renderer
  File "/usr/local/bundle/gems/actiontext-6.1.4.7/lib/action_text/engine.rb", line 59, in block (4 levels) in <class:Engine>
  File "/usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb", line 126, in instance_exec
  File "/usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb", line 126, in block in run_callbacks
  File "/usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb", line 137, in run_callbacks
  File "/usr/local/bundle/gems/actionpack-6.1.4.7/lib/abstract_controller/callbacks.rb", line 41, in process_action
  File "/usr/local/bundle/gems/actionpack-6.1.4.7/lib/action_controller/metal/rescue.rb", line 22, in process_action
  File "/usr/local/bundle/gems/actionpack-6.1.4.7/lib/action_controller/metal/instrumentation.rb", line 34, in block in process_action
  File "/usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/notifications.rb", line 203, in block in instrument
  File "/usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/notifications/instrumenter.rb", line 24, in instrument
  File "/usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/notifications.rb", line 203, in instrument
  File "/usr/local/bundle/gems/actionpack-6.1.4.7/lib/action_controller/metal/instrumentation.rb", line 33, in process_action
  File "/usr/local/bundle/gems/actionpack-6.1.4.7/lib/action_controller/metal/params_wrapper.rb", line 249, in process_action
  File "/usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/railties/controller_runtime.rb", line 27, in process_action
  File "/usr/local/bundle/