Skip to content

bin/magento setup:upgrade causes metadata locks #19220

@Flowlance

Description

@Flowlance

Preconditions (*)

  1. Magento 2.2.6
  2. MySQL 5.7.23 (Amazon RDS)
  3. Jenkins
  4. A huge store with 250000 products, and each product has more than 200 attributes.

Steps to reproduce (*)

  1. We're using Jenkins for continuous integration.
  2. When running "bin/magento setup:upgrade" from the jenkins build server, it takes a really long time (sometimes 1 hour+).
  3. After viewing MySql server processes, I can see that there's a lot queries with "Waiting for table metadata lock".
  4. It seems to be stuck on "Magento_Indexer":
Data post-updates:
Module 'Magento_Store':
Module 'Amasty_Base':
Module 'Amasty_Geoip':
Module 'Amasty_Scroll':
Module 'Amasty_ShopbyBase':
Module 'Magento_Directory':
Module 'Amasty_ShopbyBrand':
Module 'Magento_Theme':
Running data recurring...
Module 'Magento_Eav':
Module 'Magento_Customer':
Module 'Magento_Indexer':

Expected result (*)

  1. "bin/magento setup:upgrade" shouldn't take so long.
  2. No waiting for metadata locks.

Actual result (*)

screenshot 2018-11-15 at 10 36 29
2.
screenshot 2018-11-15 at 10 43 23
3. We're getting metadata locks and it can takes over an hour for them to disappear.

Metadata

Metadata

Labels

Component: IndexerIssue: needs updateAdditional information is require, waiting for responseReported on 2.4.xIndicates original Magento version for the Issue report.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions