Skip to content

Reindex and upgrade command hanging?

I try running either the reindex command bin/magento indexer:reindex or the upgrade command bin/magento setup:upgrade and for both the process hangs after a while. I checked the queries that are being executed (using show processlist) when it hangs and its always looking like this:

DELETE `main_table`  FROM `catalog_product_index_price` AS `main_table`
 LEFT JOIN `catalog_product_

This is exactly what its trying to run, its missing something in the end which causes errors and so it gets stuck – thats my guess. Question is: why and how can I fix it? Not aware of anything I changed, it just started happening.

Tried killing the execution of the query which results in the same query being executed again and again and again, no matter how often I kill it.

Ideas?