0

I have not seen this case in the other topics: magento 1.9.2CE that has a reindex working for way too many hours seems stuck ; generally it takes few minutes to 1 hour.


Context

everyday at 02h10 a homemade script cronUpdateMagentoDaily.sh does stuff and then runs:

php5.6 /var/www/html/magento/shell/indexer.php --reindex catalog_product_price

Symptoms

  • folder var/locks is empty
  • process of reindexing still ongoing but time stuck at 0
  • database shows an ended_at value strange
process_id indexer_code              status          started_at          ended_at            mode
         1 catalog_product_attribute pending         2019-09-12 03:11:01 2019-09-12 03:11:01 real_time
         2 catalog_product_price     working         2019-09-12 03:11:22 2019-09-12 03:11:01 real_time
         3 catalog_url               require_reindex 2019-09-02 15:52:08 2019-09-02 16:08:30 manual

Why would catalog_product_price have an ended_at value anterior to its started_at value? How can it be precisely the same as catalog_product_attribute ended_at value?

May that explain what that reindexation is stuck doing (apparently) nothing?

Running processes (snippet of ps -afux) showing that it does nothing:

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root      3538  0.0  0.0  27732  1984 ?        Ss    2016   8:17 /usr/sbin/cron -f
root     30940  0.0  0.0  49044  2784 ?        S    02:10   0:00  \_ /usr/sbin/CRON -f
root     30954  0.0  0.0   4504   696 ?        Ss   02:10   0:00      \_ /bin/sh -c /var/www/html/magento/cronUpdateMagentoDaily.sh
root     30961  0.0  0.0  11244  2960 ?        S    02:10   0:00          \_ /bin/bash /var/www/html/magento/cronUpdateMagentoDaily.sh
root      7058  0.0  0.1 332556 46156 ?        S    05:11   0:00              \_ php5.6 /var/www/html/magento/shell/indexer.php --reindex catalog_product_price

May it be safe to kill its process and re-run it?

1 Answer 1

1

Since the time spent on CPU was still 0, I did the follonwing (in case it helps anyone):

  1. kill the process (in my case, PID 7058)
    catalog_product_price is still at status "working"
  2. look for anything in var/locks (in my case, still empty)
  3. enforce the status in database: in table index_process set to "pending"
  4. backend > Index managment : clic on the messed up index
  5. set to manual update, save process
    catalog_product_price seems not to be locked anymore
  6. run a reindex

Problem solved! Yet I have no idea about the origin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.