Created
March 11, 2016 08:48
-
-
Save dleone81/40ada3cd1ab467b3347d to your computer and use it in GitHub Desktop.
Avoid Magento
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This file reindex all Magento indexes without any lock table | |
# This is the right order to reindexall via script | |
# I update every 3 sec any Magento product via API. | |
# Before this script I noticed this error | |
# SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction | |
echo "Reindexall via script" | |
php /mage/magento/shell/indexer.php --reindex cataloginventory_stock | |
php /mage/magento/shell/indexer.php --reindex catalog_product_attribute | |
php /mage/magento/shell/indexer.php --reindex catalog_product_price | |
php /mage/magento/shell/indexer.php --reindex catalog_url | |
php /mage/magento/shell/indexer.php --reindex catalog_product_flat | |
php /mage/magento/shell/indexer.php --reindex catalog_category_flat | |
php /mage/magento/shell/indexer.php --reindex catalog_category_product | |
php /mage/magento/shell/indexer.php --reindex catalogsearch_fulltext | |
php /mage/magento/shell/indexer.php --reindex tag_summary |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment