I recently submitted a module to the Magento Marketplace for Technical review; it got rejected with the following error:

Command returned non-zero exit code: php -f /var/www/html/bin/magento setup:di:compile-multi-tenant 2>&1

When I run the above command on my test store, I get the following error:

PHP Fatal error: Allowed memory size of 52428800 bytes exhausted (tried to allocate 73728 bytes) in /opt/bitnami/apps/magento/htdocs/vendor/composer/ClassLoader.php on line 94

Obviously as this is being done by the Technical Review I can't use the -dmemory_limit=6G parameter that has been suggested on a few Magento Stack answers.

I've tried adding ini_set('memory_limit' ,'50M') to the php files but it still seems to be getting the same error.

What are generally the causes for this in a module? And any potential solutions for the module that could prevent this from happening?


1 Answer 1


According to the http://devdocs.magento.com/guides/v2.0/install-gde/trouble/php/tshoot_php-set.html#trouble-php-memory - memory limit should be 2G. On our docker images we have memory_limit = 2048М. Errors during installation- Submitting Package to Magento Marketplace - here we already done this.

Try to increase your memory_limit settings and rerun command

php bin/magento setup:di:compile-multi-tenant 

in your project root directory.

  • Hi Eduard. Unfortunately this doesn't solve the problem of it erroring whilst running through the Technical Review. As this is run by Magento, so the limit can't be changed. Commented Apr 18, 2017 at 12:25

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.