• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Changing php memory limit on additional phps

AWSolutions

New Pleskian
Hello,

We are using plesk 7.0.x onyx. We have a site that is configured to run php 7.0.21 and I have changed through the control panel AND through editing /opt/plesk/php/7.0/etc/php.ini the memory limit to 512M

When I go to mysite.com/phpinfo.php I see the recorded value. However I have a cron that is being exectued via crontab (/etc/crontab):

* * * * * u_user /opt/plesk/php/7.0/bin/php /var/www/vhosts/mysite.com/httpdocs/cron.php

I am constantly getting these errors via email after cron execution:

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 87 bytes) in /var/www/vhosts/mysite.com/httpdocs/app/code/community/CompanyModule/ModuleName/Helper/Data.php on line 636

It seems the cli for some reason is still sticking with the default 128M for its memory, although CLI is reporting the correct value

[me@myserver ~]$ /opt/plesk/php/7.0/bin/php -i |grep memory
memory_limit => 512M => 512M

Any ideas, I am completely confused by this!
 
Hi AWSolutions,

try to use a scheduled task as for example:

Code:
cd /var/www/vhosts/mydomain.de/httpdocs/ && /opt/plesk/php/7.0/bin/php cron.php
or
Code:
/opt/plesk/php/7.0/bin/php httpdocs/cron.php

... as your domain specific documentroot starts at "/var/www/vhosts/mydomain.de/". ;)


Pls. check your "panel.log" ( or/and the domain specific log - files ) for possible issues/errors/problems, if you still experience the described issues/problems.



Additional informations:


Sometimes, it is as well a good idea to change the log - level ( TEMPORARILY! ), to get more informations in Plesk - log - files:

 
Back
Top