Skip to content

How to set the MAGE_INDEXER_THREADS_COUNT variable in Magento cloud?

In the docs, Magento advises us that we can set the MAGE_INDEXER_THREADS_COUNT environment variable:

run the reindex command using the environment variable MAGE_INDEXER_THREADS_COUNT, or add an environment variable to the env.php file

This is fine when you’re able to update env.php, but on an architecture like Magento Cloud where we’re unable to do so, it doesn’t seem possible. I’ve tried defining the value in .magento.env.yaml, however this fails validation when running the ./vendor/bin/ece-tools cloud:config:validate command, this is because the variable name is not included in vendor/magento/ece-tools/config/schema.yaml

www-data@be66b9b25468:~/html$ php ./vendor/bin/ece-tools cloud:config:validate
Environment configuration is not valid. Correct the following items in your .magento.env.yaml file:
The MAGE_INDEXER_THREADS_COUNT variable is not allowed in configuration.

Is there any other way to set this value?