Magento – Indexer stuck in processing

indexingmagento2reindex

Magento ver. 2.0.7

Hello, I'm trying to reindex my store so that products I added from the backend will show up on the frontend.

As shown below, after running bin/magento indexer:reindex, every index has been rebuilt successfully but bin/magento indexer:status shows some of the indices still processing as confirmed in the Admin Panel > System > Index Management

What can I do to resolve this? My website no longer shows any products.

[user@server root]$ bin/magento indexer:reindex
Customer Grid index has been rebuilt successfully in 00:00:00
Category Products index has been rebuilt successfully in 00:00:00
Product Categories index has been rebuilt successfully in 00:00:00
Product Price index has been rebuilt successfully in 00:00:04
Product EAV index has been rebuilt successfully in 00:00:06
Stock index has been rebuilt successfully in 00:00:00
Catalog Rule Product index has been rebuilt successfully in 00:00:00
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Catalog Search index has been rebuilt successfully in 00:00:00

[user@server root]$ bin/magento indexer:status
Customer Grid:                                     Processing
Category Products:                                 Processing
Product Categories:                                Processing
Product Price:                                     Ready
Product EAV:                                       Ready
Stock:                                             Ready
Catalog Rule Product:                              Ready
Catalog Product Rule:                              Ready
Catalog Search:                                    Processing

Index Management

Best Answer

You can fix this from the command line by reseting the index which will invalidate the state of the index and remove the processing flag from the index.

php bin/magento indexer:reset

Optionally you may also append the index name to the command to just just reset that index.