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':


Hi @Flowlance. Thank you for your report.
To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento-engcom-team give me $VERSION instance
where $VERSION is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop).
For more details, please, review the Magento Contributor Assistant documentation.
@Flowlance do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
Hi @TomashKhamlai. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.
[ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.3-develop branchDetails
- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 5. Verify that the issue is reproducible on 2.2-develop branch. Details
- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x
[ ] 6. Add label Issue: Confirmed once verification is complete.
[ ] 7. Make sure that automatic system confirms that report has been added to the backlog.
@Flowlance do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
Could you please share your experience? How the products and attributes were moved to vanilla Magento Open Source instance?
@TomashKhamlai Hi. I cannot reproduce this on a vanilla installation. setup:upgrade is very quick there.
What's the best way to copy this number of products over to the vanilla instance?
The system->export doesn't seem to handle this amount very well. It crashes.
@Flowlance you can try using vanilla instance with the copy of this database.
@Flowlance I have an experience on this problem. I don't know exactly why this happened. Probably you have huge product images in pub/media/catalog/product directory. You can temporary move the product directory to somewhere else (outside pub directory). then run again bin/magento setup:upgrade. This should be much faster this time. then move back the product directory to original location. This problem only occur when you run setup:upgrade command. This way may be not you expected but it's working for me.
Hi @engcom-backlog-nazar. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.[x] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.
[x] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
[x] 4. Verify that the issue is reproducible on 2.3-develop branchDetails
- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 5. Verify that the issue is reproducible on 2.2-develop branch. Details
- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x
[x] 6. Add label Issue: Confirmed once verification is complete.
[x] 7. Make sure that automatic system confirms that report has been added to the backlog.
@engcom-backlog-nazar Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-97435 were created
I can confirm we are experiencing similar issues with several installations - a long chain of slow queries and locks caused by this step.
@Flowlance I have an experience on this problem. I don't know exactly why this happened. Probably you have huge product images in
pub/media/catalog/productdirectory. You can temporary move the product directory to somewhere else (outside pub directory). then run againbin/magento setup:upgrade. This should be much faster this time. then move back the product directory to original location. This problem only occur when you run setup:upgrade command. This way may be not you expected but it's working for me.
Hi I work with @Flowlance we don't have product images on this installation, all images are served via a CDN so no images are managed by Magento.
Hi @Nazar65. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:
Component: XXXXX label(s) to the ticket, indicating the components it may be related to.[ ] 2. Verify that the issue is reproducible on 2.3-develop branchDetails
- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 3. Verify that the issue is reproducible on 2.2-develop branch. Details
- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x
[ ] 4. If the issue is not relevant or is not reproducible any more, feel free to close it.
HI here, actually this is configuration issue about mysql.
Translation: by default, MySQL 5.5 will āmeta-blockā for 1 year! In my humble opinion, this is a bug, especially given the various subtle and sometimes quiet ways that metadata locking can lock the server. The default for innodb_lock_wait_timeout, by comparison, is 50 seconds. Thatās reasonable, but 31536000 is not. I would only set a timeout, or any kind of wait or interval value, to such a high value to play a practical joke on someone.
```
session1 > start transaction;
Query OK, 0 rows affected (0.00 sec)
session1 > select * from test order by id;
+----+------+
| id | x |
+----+------+
| 1 | foo |
| 2 | bar |
+----+------+
2 rows in set (0.00 sec)
session2 > ALTER TABLE test add column c char(32) default 'dummy_text';
session3 > show processlist;
+----+----------+-----------+------+---------+------+---------------------------------+-------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+----------+-----------+------+---------+------+---------------------------------+-------------------------------------------------------------+
| 1 | msandbox | localhost | test | Sleep | 140 | | NULL |
| 2 | msandbox | localhost | test | Query | 3 | Waiting for table metadata lock | ALTER TABLE test add column c char(32) default 'dummy_text' |
| 3 | msandbox | localhost | test | Query | 0 | NULL | show processlist |
+----+----------+-----------+------+---------+------+---------------------------------+-------------------------------------------------------------+
3 rows in set (0.00 sec)
session1 > start transaction;
Query OK, 0 rows affected (0.00 sec)
session1 > select * from test_2 order by id;
+----+------+------------+
| id | x | c |
+----+------+------------+
| 1 | foo | dummy_text |
| 2 | bar | dummy_text |
+----+------+------------+
2 rows in set (0.00 sec)
session6 > ALTER TABLE test_2 DROP COLUMN c;
session7 > select * from test_2 order by id;
session8 > select * from test_2 order by id;
session9 > select * from test_2 order by id;
session10 > select * from test_2 order by id;
session3 > show processlist;
+----+----------+-----------+------+---------+------+---------------------------------+----------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+----------+-----------+------+---------+------+---------------------------------+----------------------------------+
| 1 | msandbox | localhost | test | Sleep | 403 | | NULL |
| 3 | msandbox | localhost | test | Query | 0 | NULL | show processlist |
| 6 | msandbox | localhost | test | Query | 229 | Waiting for table metadata lock | ALTER TABLE test_2 DROP COLUMN c |
| 7 | msandbox | localhost | test | Query | 195 | Waiting for table metadata lock | select * from test_2 order by id |
| 8 | msandbox | localhost | test | Query | 180 | Waiting for table metadata lock | select * from test_2 order by id |
| 9 | msandbox | localhost | test | Query | 169 | Waiting for table metadata lock | select * from test_2 order by id |
| 10 | msandbox | localhost | test | Query | 55 | Waiting for table metadata lock | select * from test_2 order by id |
+----+----------+-----------+------+---------+------+---------------------------------+----------------------------------+
7 rows in set (0.00 sec)
Hi @Nazar65, what was the fix for this, I seem to be experiencing the same issue on a site running 2.2.5; we're not currently in a position to upgrade.
Why is is this closed without a fix or PR ? I am experiencing the same issue in Magento 2.3.
i have got the same issue. Table Metadata Lock for trg_cataloginventory_stock_item_after_inser.
How do you have solved?
Most helpful comment
Hi @Nazar65, what was the fix for this, I seem to be experiencing the same issue on a site running 2.2.5; we're not currently in a position to upgrade.