停止 Magento 索引进程
如何停止索引过程?我已经导入了 15,000 个产品并开始索引,但现在它停留在“类别搜索索引”的处理上。现在已经卡在处理中两天了,如何停止索引过程?
任何帮助将不胜感激,提前谢谢您。
How can I stop the indexing process? I had imported 15,000 products and started the indexing, but now it's stuck on processing for "Category search index". It has been stuck on processing for two days now, how can I stop the indexing process?
Any help would be appreciated, thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
当 Magento 开始为“索引管理”列表中的每个项目建立索引时,它将整个“index_process”表的相关“状态”字段设置为“工作”。如果在索引过程中发生错误,脚本将停止并且状态保持为“正在工作”。因此,“处理”图像挂在“索引管理”页面上。当然,没有办法确保索引进程仍然没有运行,而是检查服务器的进程列表(或者残酷地重新启动或你的apache)。
我知道解决此问题的唯一明智方法是找出导致此错误的原因并修复它。您可以通过从 shell 运行索引并查找输出来完成此操作。命令如下:
如果您没有 SSH 访问权限,您还可以尝试从服务器的错误日志中查找此错误。
如果您只想删除“正在处理”图像,您可以运行以下 MYSQL 查询:
但是,这并不能解决问题,而只是隐藏输出。
When Magento starts indexing of each item in the 'Index Management' list it sets 'status' field of correlative entire of 'index_process' table to 'working'. If error happens during the indexing process script halts and status remains as 'working'. As a result 'processing' image hangs at the 'Index Management' page. Of course there's no way to make sure that indexing process is still not running but checking your server's processes list (or brutal restarting or your apache).
The only intelligent way I know to solve this issue is to find out what causing this error and fix it. You can do it by running indexing from your shell and looking for the output. Here is the command:
If you don't have an SSH access you can also try locating this error from your server's error logs.
If you just want to remove 'processing' image you can just run the following MYSQL query:
However this will not solve the problem, but only hide the output.
也许最简单的方法是重新启动 Apache。它将正常关闭所有打开的访问者连接,并应终止 PHP 进程。
--------- 编辑 ----------
数据库中有一组看起来与索引相关的表,
index_process
和index_process_event
。您可以尝试将相关记录的状态恢复为待处理,然后重试...Probably the easiest way is to restart Apache. It will gracefully close any open visitor connections, and should terminate the PHP process.
--------- EDIT ----------
There are a set of tables in the database that look to be related to the indexing,
index_process
andindex_process_event
. You could try reverting the state of the relevant record there to pending and try again...请记住,如果您在与当前使用的用户不同的用户下运行 magento(www-data 与 mySshLoginUser),您可能会遇到锁定文件的权限问题。如果您手动运行 shell 索引器,这些锁定文件将属于您的 ssh 用户。
最坏的情况,删除 var/locks/* 中的那些锁定文件并尝试。
Keep in mind, if you are running magento under a different user than the one you are currently using (www-data vs mySshLoginUser), you might open yourself up to permissions problems on the lock files. If you have manually run the shell indexer, those lock files will belong to your ssh user.
Worst case scenario, delete those lock files in var/locks/* and try it.