停止 Magento 索引进程

发布于 2024-09-30 13:52:32 字数 106 浏览 3 评论 0原文

如何停止索引过程?我已经导入了 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

独留℉清风醉 2024-10-07 13:52:32

当 Magento 开始为“索引管理”列表中的每个项目建立索引时,它将整个“index_process”表的相关“状态”字段设置为“工作”。如果在索引过程中发生错误,脚本将停止并且状态保持为“正在工作”。因此,“处理”图像挂在“索引管理”页面上。当然,没有办法确保索引进程仍然没有运行,而是检查服务器的进程列表(或者残酷地重新启动或你的apache)。

我知道解决此问题的唯一明智方法是找出导致此错误的原因并修复它。您可以通过从 shell 运行索引并查找输出来完成此操作。命令如下:

php shell/indexer.php reindexall

如果您没有 SSH 访问权限,您还可以尝试从服务器的错误日志中查找此错误。

如果您只想删除“正在处理”图像,您可以运行以下 MYSQL 查询:

UPDATE `index_process` SET `status` = 'pending' WHERE `status` = 'working'

但是,这并不能解决问题,而只是隐藏输出。

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:

php shell/indexer.php reindexall

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:

UPDATE `index_process` SET `status` = 'pending' WHERE `status` = 'working'

However this will not solve the problem, but only hide the output.

如果没结果 2024-10-07 13:52:32

也许最简单的方法是重新启动 Apache。它将正常关闭所有打开的访问者连接,并应终止 PHP 进程。

--------- 编辑 ----------

数据库中有一组看起来与索引相关的表, index_processindex_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 and index_process_event. You could try reverting the state of the relevant record there to pending and try again...

橙味迷妹 2024-10-07 13:52:32

请记住,如果您在与当前使用的用户不同的用户下运行 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文