I am having an issue with the customer_grid indexer php bin/magento index:reindex customer_grid

After running this command, the cli will wait indefinitely for the process to finish. I use update indexer_state set status='invalid' where status =' working' to reset the customer_grid index but then the same thing happens after running the command again.

Is there a way to have a more verbose output or debug log for this command that I can refer to figure out what is causing the indexer to fail?

  • Please run query in order SET SQL_SAFE_UPDATES = 0; , update indexer_state set status = 'invalid' where status != 'valid';, php bin/magento indexer:reindex customer_grid
    – Jackson
    Dec 6, 2016 at 2:01
  • Applied the change, but did not solve the issue. Do we know what files manage the customer_grid index? Dec 6, 2016 at 17:20
  • See what error you have in var/log/exceptions.lo.g Something fails in customer grid and it must be a SQL query. If you have many customers than maybe you need to increase ini_set('memory_limit', '4096M'). You can add it in app/bootstrap.php (which is included by both index.php and bin/magento), directly in bin/magento or in a server configuration. Dec 6, 2016 at 20:05
  • I ended up running the indexer as a background task php bin/magento index:reindex customer_grid & and ran app like top to prevent ssh timeout. It took ~45min but the indexer completed. It would be nice if the indexer had an output like static-content that prevented ssh from timing out. Jan 9, 2017 at 21:11

2 Answers 2


Try to check your logs, running this command below when you run the php bin/magento index:reindex

tail -f var/log/debug.log

Try to enable SQL logging if needed.

php bin/magento dev:query-log:enable

Use verbose option of magento command php bin/magento index:reindex -vv customer_grid

  • 1
    -v -vv -vvv does not output anything for the customer_grid Dec 21, 2016 at 1:39

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.