0

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?

asked Jan 10, 2023 at 13:04

1 Answer 1

1

In Magento Cloud, you can set the MAGE_INDEXER_THREADS_COUNT environment variable in the .magento.app.yaml file. This file is located in the root directory of your Magento Cloud project and controls various settings for your environment, including environment variables.

To set the MAGE_INDEXER_THREADS_COUNT variable, you can add the following line to the variables section of the .magento.app.yaml file:

MAGE_INDEXER_THREADS_COUNT: <value>

Where is the number of threads you want to use for indexing. For example, if you want to use 8 threads, you would set the variable as:

MAGE_INDEXER_THREADS_COUNT: 8

After you have set the variable in the .magento.app.yaml file, you need to deploy the changes to your environment.

magento-cloud deploy

Note that the change in this file will only affect the next time you deploy. It will not affect the current running environment.

answered Jan 12, 2023 at 9:59

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.