Closed dwilkie closed 9 years ago
See this exception on Errbit
DETAIL: Process 6423 waits for ShareLock on transaction 150070929; blocked by process 12082. Process 12082 waits for ShareLock on transaction 150070934; blocked by process 6423. HINT: See server log for query details. #
https://chibi.herokuapp.com/phone_call_completions.xml"
phone_call_completions#create
Jun 02 9:48am
0
{ "ApiVersion" => "adhearsion-twilio-0.0.1", "CallDuration" => "3", "CallSid" => "2da23905-f6aa-4862-9b09-ee8694130e57", "CallStatus" => "no-answer", "From" => "+85587538974", "To" => "+2441", "action" => "create", "controller" => "phone_call_completions", "format" => "xml" }
{ }
602: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb -> **exec_prepared** 602: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb -> **block in exec_cache** 473: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb -> **block in log** 20: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb -> **instrument** 467: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb -> **log** 601: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb -> **exec_cache** 585: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb -> **execute_and_clear** 173: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/connection_adapters/postgresql/database_statements.rb -> **exec_delete** 114: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb -> **update** 14: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/query_cache.rb -> **update** 345: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/relation.rb -> **update_all** 472: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/persistence.rb -> **touch** 296: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/callbacks.rb -> **block in touch** 88: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **call** 88: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **_run_callbacks** 776: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **_run_touch_callbacks** 296: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/callbacks.rb -> **touch** 295: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/transactions.rb -> **block in touch** 347: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/transactions.rb -> **block in with_transaction_returning_status** 211: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb -> **transaction** 220: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/transactions.rb -> **transaction** 344: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/transactions.rb -> **with_transaction_returning_status** 295: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/transactions.rb -> **touch** 49: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/no_touching.rb -> **touch** 90: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/associations/builder/belongs_to.rb -> **touch_record** 103: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/associations/builder/belongs_to.rb -> **block in add_touch_callbacks** 448: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **instance_exec** 448: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **block in make_lambda** 228: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **call** 228: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **block in halting_and_conditional** 506: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **call** 506: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **block in call** 506: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **each** 506: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **call** 92: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **_run_callbacks** 776: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **_run_save_callbacks** 302: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/callbacks.rb -> **create_or_update** 120: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/persistence.rb -> **save** 37: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/validations.rb -> **save** 21: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb -> **save** 286: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/transactions.rb -> **block (2 levels) in save** 347: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/transactions.rb -> **block in with_transaction_returning_status** 211: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb -> **transaction** 220: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/transactions.rb -> **transaction** 344: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/transactions.rb -> **with_transaction_returning_status** 286: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/transactions.rb -> **block in save** 301: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/transactions.rb -> **rollback_active_record_state!** 285: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/transactions.rb -> **save** 91: [PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/bundler/gems/aasm-f394bde6462f/lib/aasm/persistence/active_record_persistence.rb -> **aasm_write_state** 86: [PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/bundler/gems/aasm-f394bde6462f/lib/aasm/instance_base.rb -> **set_current_state_with_persistence** 103: [PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/bundler/gems/aasm-f394bde6462f/lib/aasm/aasm.rb -> **aasm_fired** 78: [PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/bundler/gems/aasm-f394bde6462f/lib/aasm/aasm.rb -> **aasm_fire_event** 175: [PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/bundler/gems/aasm-f394bde6462f/lib/aasm/persistence/active_record_persistence.rb -> **block in aasm_fire_event** 213: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb -> **block in transaction** 188: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb -> **within_new_transaction** 213: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb -> **transaction** 220: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/transactions.rb -> **transaction** 175: [PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/bundler/gems/aasm-f394bde6462f/lib/aasm/persistence/active_record_persistence.rb -> **aasm_fire_event** 81: [PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/bundler/gems/aasm-f394bde6462f/lib/aasm/base.rb -> **block in event** 149: app/models/phone_call.rb -> **complete!** 7: app/controllers/phone_call_completions_controller.rb -> **create** 4: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_controller/metal/implicit_render.rb -> **send_action** 198: [GEM_ROOT]/gems/actionpack-4.2.1/lib/abstract_controller/base.rb -> **process_action** 10: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_controller/metal/rendering.rb -> **process_action** 20: [GEM_ROOT]/gems/actionpack-4.2.1/lib/abstract_controller/callbacks.rb -> **block in process_action** 117: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **call** 117: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **call** 555: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **block (2 levels) in compile** 505: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **call** 505: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **call** 92: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **_run_callbacks** 776: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **_run_process_action_callbacks** 81: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **run_callbacks** 19: [GEM_ROOT]/gems/actionpack-4.2.1/lib/abstract_controller/callbacks.rb -> **process_action** 29: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_controller/metal/rescue.rb -> **process_action** 32: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_controller/metal/instrumentation.rb -> **block in process_action** 164: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/notifications.rb -> **block in instrument** 20: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb -> **instrument** 164: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/notifications.rb -> **instrument** 30: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_controller/metal/instrumentation.rb -> **process_action** 250: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_controller/metal/params_wrapper.rb -> **process_action** 18: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/railties/controller_runtime.rb -> **process_action** 137: [GEM_ROOT]/gems/actionpack-4.2.1/lib/abstract_controller/base.rb -> **process** 30: [GEM_ROOT]/gems/actionview-4.2.1/lib/action_view/rendering.rb -> **process** 196: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_controller/metal.rb -> **dispatch** 13: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_controller/metal/rack_delegation.rb -> **dispatch** 237: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_controller/metal.rb -> **block in action** 74: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb -> **call** 74: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb -> **dispatch** 43: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb -> **serve** 43: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_dispatch/journey/router.rb -> **block in serve** 30: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_dispatch/journey/router.rb -> **each** 30: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_dispatch/journey/router.rb -> **serve** 819: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb -> **call** 24: [GEM_ROOT]/gems/rack-1.6.0/lib/rack/etag.rb -> **call** 38: [GEM_ROOT]/gems/rack-1.6.0/lib/rack/conditionalget.rb -> **call** 13: [GEM_ROOT]/gems/rack-1.6.0/lib/rack/head.rb -> **call** 27: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_dispatch/middleware/params_parser.rb -> **call** 260: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_dispatch/middleware/flash.rb -> **call** 225: [GEM_ROOT]/gems/rack-1.6.0/lib/rack/session/abstract/id.rb -> **context** 220: [GEM_ROOT]/gems/rack-1.6.0/lib/rack/session/abstract/id.rb -> **call** 560: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_dispatch/middleware/cookies.rb -> **call** 36: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/query_cache.rb -> **call** 649: [GEM_ROOT]/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb -> **call** 29: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_dispatch/middleware/callbacks.rb -> **block in call** 88: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **call** 88: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **_run_callbacks** 776: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **_run_call_callbacks** 81: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/callbacks.rb -> **run_callbacks** 27: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_dispatch/middleware/callbacks.rb -> **call** 78: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_dispatch/middleware/remote_ip.rb -> **call** 17: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_dispatch/middleware/debug_exceptions.rb -> **call** 30: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_dispatch/middleware/show_exceptions.rb -> **call** 38: [GEM_ROOT]/gems/railties-4.2.1/lib/rails/rack/logger.rb -> **call_app** 20: [GEM_ROOT]/gems/railties-4.2.1/lib/rails/rack/logger.rb -> **block in call** 68: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb -> **block in tagged** 26: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb -> **tagged** 68: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb -> **tagged** 20: [GEM_ROOT]/gems/railties-4.2.1/lib/rails/rack/logger.rb -> **call** 21: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_dispatch/middleware/request_id.rb -> **call** 22: [GEM_ROOT]/gems/rack-1.6.0/lib/rack/methodoverride.rb -> **call** 18: [GEM_ROOT]/gems/rack-1.6.0/lib/rack/runtime.rb -> **call** 28: [GEM_ROOT]/gems/activesupport-4.2.1/lib/active_support/cache/strategy/local_cache_middleware.rb -> **call** 113: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_dispatch/middleware/static.rb -> **call** 113: [GEM_ROOT]/gems/rack-1.6.0/lib/rack/sendfile.rb -> **call** 24: [GEM_ROOT]/gems/actionpack-4.2.1/lib/action_dispatch/middleware/ssl.rb -> **call** 29: [GEM_ROOT]/gems/hirefire-resource-0.3.5/lib/hirefire/middleware.rb -> **call** 518: [GEM_ROOT]/gems/railties-4.2.1/lib/rails/engine.rb -> **call** 164: [GEM_ROOT]/gems/railties-4.2.1/lib/rails/application.rb -> **call** 576: [GEM_ROOT]/gems/unicorn-4.8.3/lib/unicorn/http_server.rb -> **process_client** 670: [GEM_ROOT]/gems/unicorn-4.8.3/lib/unicorn/http_server.rb -> **worker_loop** 525: [GEM_ROOT]/gems/unicorn-4.8.3/lib/unicorn/http_server.rb -> **spawn_missing_workers** 140: [GEM_ROOT]/gems/unicorn-4.8.3/lib/unicorn/http_server.rb -> **start** 126: [GEM_ROOT]/gems/unicorn-4.8.3/bin/unicorn -> **<top (required)>** 23: [PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/bin/unicorn -> **load** 23: [PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/bin/unicorn -> **<main>**
Move this into background task so it will be automatically retried
See this exception on Errbit
PG::TRDeadlockDetected: ERROR: deadlock detected
DETAIL: Process 6423 waits for ShareLock on transaction 150070929; blocked by process 12082. Process 12082 waits for ShareLock on transaction 150070934; blocked by process 6423. HINT: See server log for query details. #
Summary
URL
https://chibi.herokuapp.com/phone_call_completions.xml"
Where
phone_call_completions#create
Occured
Jun 02 9:48am
Similar
0
Params
Session
Backtrace
Environment