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?