0

I am running the following command php -d memory_limit=-1 bin/magento indexer:reindex foo

When running it on my table, my terminal goes haywire showing the following:

Memory used: 706M
Memory used: 706M
Memory used: 706M
Memory used: 706M
Memory used: 706M
Memory used: 706M
Memory used: 706M
Memory used: 706M
Memory used: 706M
Memory used: 706M
Memory used: 706M
Memory used: 706M
Memory used: 706M
Memory used: 706M

And so on. It's also dumping this in real time into the terminal, so I can't type anything. The only way out is Ctrl+C

When I check bin/magento indexer:status it shows foo as processing.

I've already checked this How to check indexer reindex progress in Magento 2? and it is NOT an answer to my solution, because I've reset the index and started over several times, as well as set the memory limit to -1, which should be infinite, and my machine has lots of memory, 32 GB, and the whole DB is only 6GB.

Is there a way to see how far along it is when it's status is processsing? Or am I actually killing the processes when I do Ctrl+C in the terminal, I'm guessing so but not quite sure.

1 Answer 1

0

Is there a way to see how far along it is when it's status is processsing? Or am I actually killing the processes when I do Ctrl+C in the terminal, I'm guessing so but not quite sure.

Yes, Ctrl+C will kill the process. Try the below method If you want to run the command in the background.

/var/www/html# php bin/magento indexer:reindex > /dev/null 2>&1 &
[1] 137  - It is a process ID, you can use it later if you want to kill this specific process id.
/var/www/html# jobs -l
[1]+   137 Running                 php bin/magento indexer:reindex > /dev/null 2>&1 &
/var/www/html# jobs -l
[1]+   137 Exit 1                  php bin/magento indexer:reindex > /dev/null 2>&1
/var/www/html# jobs -l
/var/www/html# 

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.