5

As a team, we run a software as a service, written in Ruby on Rails, for the National Home Watch Association to aid teams in monitoring cottages, homes, cabins, garages, boat houses, spas, pools, driveways and yards in the tenant's absence.

There is an issue logged in Airbrake with 67 occurrences since our last deployment. This is a transcript of the Airbrake synopsis :

Error class PG::TRDeadlockDetected
Error message PG::TRDeadlockDetected: ERROR: deadlock detected DETAIL: Process i waits for ShareLock on transaction j; blocked by process k. Process k waits for ShareLock on transaction j; blocked by process i. HINT: See server log for query details.
Action tenant/tasks#update
URL https://subdomain.qridithomewatch.com/tasks/{id}
File [GEM_ROOT]/gems/activerecord-4.0.4/lib/active_record/connection_adapters/postgresql_adapter.rb:791

This is the snippet of the tenant/tasks#update action :

def update
    respond_smart_with @resource, {}, (@resource.qrid_id ? edit_tenant_qrid_url(@resource.qrid_id) : tenant_tasks_url(work_type_id: @resource.work_type_id, client_type: @resource.client_type)) if @resource.update(resource_params)    
end

Also, I have included the Respondable Concern (respond_smart_with) just in case as a PasteBin : http://pastebin.com/pFQuRc4P

I appreciate your time and consideration.

Kind regards, Jason of Quick Report Systems

jwmcveigh
  • 51
  • 1
  • 4
  • Any luck with this one? I've been getting these as of the last few weeks and struggling to pin down the culprit. – Ethan Jul 06 '14 at 22:02
  • I think this may be the same problem as here: http://stackoverflow.com/questions/10331080/getting-a-deadlock-when-altering-table. The only answer seems reasonable, but I haven't tried it yet. If anyone does, I'd love to hear the results. – Aaron Sep 30 '14 at 14:48

0 Answers0