I'm running Magento 2.2.2 with cpanel
I am getting this error in update.log:
--
setup-cron.ERROR: Your current PHP memory limit is 128M. Magento 2 requires it to be set to 756M or more. As a user with root privileges, edit your php.ini file to increase memory_limit. (The command php --ini tells you where it is located.) After that, restart your web server and try again.
--
I don't have the ability to edit the php.ini file specified in "php --ini", or restart the shared web server.
I have set memory_limit to 756M in my php.ini file, and I have specified the php.ini file location in my crontab AND I also specified the memory_limit to 756 in crontab.
-- Output of "crontab -l"
10,29,35,59 * * * * /usr/local/bin/php -c /home/chargoggagoggman/public_html --d memory_limit=756M /home/chargoggagoggman/public_html/update/cron.php >> /home/chargoggagoggman/public_html/var/log/update.cron.log
7,29,30,58 * * * * /usr/local/bin/php -c /home/chargoggagoggman/public_html -d memory_limit=756M /home/chargoggagoggman/public_html/bin/magento setup:cron:run >> /home/chargoggagoggman/public_html/var/log/setup.cron.log
12,24,43,48 * * * * /usr/local/bin/php -c /home/chargoggagoggman/public_html -d memory_limit=756M /home/chargoggagoggman/public_html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /home/chargoggagoggman/public_html/var/log/magento.cron.log
--
Each time I make a change, I run "php bin/magento cron:run" twice, per a suggestion I saw in this forum
I also tried "php bin/magento setup:cron:run"
adding a phpinfo query to the home page of my website showed nothing contradictory
Suggestions, please?
Hi @PanchoCole,
Can you run this on your server console?
php -i | grep limit
The output could be, for example:
memory_limit => -1 => -1 mysql.max_links => Unlimited => Unlimited mysql.max_persistent => Unlimited => Unlimited mysqli.max_links => Unlimited => Unlimited mysqli.max_persistent => Unlimited => Unlimited pcre.backtrack_limit => 1000000 => 1000000 pcre.recursion_limit => 100000 => 100000 session.cache_limiter => nocache => nocache soap.wsdl_cache_limit => 5 => 5
Can you check which value you get on memory_limit ?
It's shared hosting. You cant use console.
I got the same issue.
Hi @Dmitriy_Komar,
Maybe is a good idea to explore another hosting options. Using Magento 2 without full access to the console it could be a bad a idea.
I can't imagine having a Magento 2 store with limitations when I need to use the console.
Hi,
I am facing the same issue. My cron is not running on scheduled times. Error on magento.cron.log:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 655360 bytes) in /var/www/vhosts/user/httpdocs/magento/generated/metadata/global.php on line 8
This is the result of my run:
-bash-4.2$ php -i | grep limit
memory_limit => 768M => 768M
Total Links => 0/unlimited
ldap.max_links => Unlimited => Unlimited
mbstring.regex_stack_limit => 100000 => 100000
mysqli.max_links => Unlimited => Unlimited
mysqli.max_persistent => Unlimited => Unlimited
odbc.max_links => Unlimited => Unlimited
odbc.max_persistent => Unlimited => Unlimited
pcre.backtrack_limit => 1000000 => 1000000
pcre.recursion_limit => 100000 => 100000
pgsql.max_links => Unlimited => Unlimited
pgsql.max_persistent => Unlimited => Unlimited
redis.pconnect.connection_limit => 0 => 0
session.cache_limiter => nocache => nocache
soap.wsdl_cache_limit => 5 => 5
Please help
Hi @sugaryusuf,
Please check the PHP Settings here: https://devdocs.magento.com/guides/v2.4/install-gde/prereq/php-settings.html#check-php-settings
I guess those values are not enough.
Also, check the PHP version you are using.
Cheers!
Hi,
I am using php 7.3 version. Which values are not enough?