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

ActiveRecord::Deadlocked in admin/products_v3#bulk_update #12974

Open
mkllnk opened this issue Nov 12, 2024 · 1 comment
Open

ActiveRecord::Deadlocked in admin/products_v3#bulk_update #12974

mkllnk opened this issue Nov 12, 2024 · 1 comment
Labels

Comments

@mkllnk
Copy link
Member

mkllnk commented Nov 12, 2024

Error in Open Food Network (Rails)

ActiveRecord::Deadlocked in admin/products_v3#bulk_update
PG::TRDeadlockDetected: ERROR: deadlock detected
DETAIL: Process 14960 waits for ShareLock on transaction 47239840; blocked by process 13644.
Process 13644 waits for ShareLock on transaction 47239854; blocked by process 14960.
HINT: See server log for query details.
CONTEXT: while updating tuple (71,7) in relation "enterprises"

View on Bugsnag

Stacktrace

app/models/enterprise.rb:605 - touch_distributors
app/models/spree/product.rb:299 - touch_supplier
app/services/sets/product_set.rb:107 - create_or_update_variant
app/services/sets/product_set.rb:98 - block in update_variants_attributes
app/services/sets/product_set.rb:97 - each
app/services/sets/product_set.rb:97 - update_variants_attributes
app/services/sets/product_set.rb:93 - update_product_variants
app/services/sets/product_set.rb:58 - update_product
app/services/sets/product_set.rb:52 - update_product_attributes
app/services/sets/product_set.rb:22 - block in save
app/services/sets/product_set.rb:21 - each_value
app/services/sets/product_set.rb:21 - each
app/services/sets/product_set.rb:21 - map
app/services/sets/product_set.rb:21 - save
app/controllers/admin/products_v3_controller.rb:24 - bulk_update

View full stacktrace

Created by Admin OFF via Bugsnag

@dacook
Copy link
Member

dacook commented Nov 12, 2024

This occurred when a delete occurred at the same time:

  • Delete: Nov 8th, 08:46:44 GMT+11
  • Bulk update: Nov 8th, 08:46:45 GMT+11
    Screenshot 2024-11-13 at 10 11 03 AM

I checked, the deleted product was included in the bulk update (product id 17781 on au_prod)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: All the things 💤
Development

No branches or pull requests

2 participants