我搜索过类似的主题,但似乎没有解决方案.有没有办法阻止特定的magento索引器进程?
当我尝试从shell重新索引时,我得到了这个:
php -f indexer.php reindex all
Stock Status Index process is working now. Please try run this process later.
Product Prices Index process is working now. Please try run this process later.
Catalog URL Rewrites Index process is working now. Please try run this process later.
Product Flat Data Index process is working now. Please try run this process later.
Category Flat Data Index process is working now. Please try run this process later.
Category Products Index process is working now. Please try run this process later.
Catalog Search Index Index process is working now. Please try run this process later.
Stock Status index was rebuilt successfully
Tag Aggregation Data Index process is working now. Please try run this process later.
Run Code Online (Sandbox Code Playgroud)
当我尝试查看索引器状态时,我得到了这个:
Product Attributes: Pending
Product Prices: Pending
Catalog URL Rewrites: Pending
Product Flat Data: Pending
Category Flat Data: Pending
Category Products: Pending
Catalog Search Index: Pending
Stock Status: Pending
Tag Aggregation Data: Pending
Run Code Online (Sandbox Code Playgroud)
如果我从管理员重新索引,重建索引过程不会抛出任何错误.是否有关于此事的一些文件的链接?
谢谢,拉杜
Ala*_*orm 22
索引主要(通常意味着我很确定它总是)在单个HTTP请求期间发生.如果该请求由于PHP错误而停止/超时/失败,则索引器会保留锁定文件,即使没有正在进行索引.这些文件位于
/path/to/mage/var/locks/index_process*.lock
Run Code Online (Sandbox Code Playgroud)
该
索引流程现在正在运行.请稍后尝试运行此过程
例外是Magento告诉你它看到了其中一个锁文件.如果您确定没有其他人试图运行索引,只需删除文件并重新启动索引.
首先,尝试将索引模式设置为手动:
php indexer.php --mode-manual catalog_product_attribute
php indexer.php --mode-manual catalog_product_price
php indexer.php --mode-manual catalog_url
php indexer.php --mode-manual catalog_product_flat
php indexer.php --mode-manual catalog_category_flat
php indexer.php --mode-manual catalog_category_product
php indexer.php --mode-manual catalogsearch_fulltext
php indexer.php --mode-manual cataloginventory_stock
php indexer.php --mode-manual tag_summary
Run Code Online (Sandbox Code Playgroud)
然后,尝试重新索引所有索引:
php indexer.php reindexall
Run Code Online (Sandbox Code Playgroud)
并再次将模式设置为实时:
php indexer.php --mode-realtime catalog_product_attribute
php indexer.php --mode-realtime catalog_product_price
php indexer.php --mode-realtime catalog_url
php indexer.php --mode-realtime catalog_product_flat
php indexer.php --mode-realtime catalog_category_flat
php indexer.php --mode-realtime catalog_category_product
php indexer.php --mode-realtime catalogsearch_fulltext
php indexer.php --mode-realtime cataloginventory_stock
php indexer.php --mode-realtime tag_summary
Run Code Online (Sandbox Code Playgroud)
如果这不起作用,请尝试使用类似sudo /etc/init.d/apache2 restart. 这应该会停止索引过程,之后您可能会再次启动它。但请注意,如果您重新启动 Apache,您的站点将在几秒钟内不可用。