Question Plesks and Nextcloud and PHP

Detlef D.

New Pleskian
Server operating system version
Ubuntu 22.04.5 LTS
Plesk version and microupdate number
Plesk Obsidian 18.0.64
Hello, I have a problem with Plesks and Nextcloud and PHP

I keep getting an email with the information

Re: Cron <linux1user@linux1> (/opt/plesk/php/8.3/bin/php -f 'cloud/nextcloud/occ' -- 'db:add-missing-indices') > /dev/null

Text: The current PHP memory limit is below the recommended value of 512MB.

However, 512M is already entered everywhere under the domain under PHP in the field memory_limit under all installed domains. I've already entered 1000M for testing purposes. The email keeps coming...

Where is the problem? Where do I have to change something?

cu Detlef
 
Hi Detlef,

The PHP settings for a domain are not applied in the cron environment. It will use the default php.ini memory_limit which should be 128M.

You can specify it for the cron task using -d 'memory_limit=1G':
Code:
(/opt/plesk/php/8.3/bin/php -d 'memory_limit=1G' -f 'cloud/nextcloud/occ' -- 'db:add-missing-indices') > /dev/null

Or you can edit the global php.ini for PHP 8.3. Tools & Settings > General Settings: PHP Settings > click on any PHP 8.3 handlers (php.ini is the same for all of them) > php.ini. Here you will update ``memory_limit = 128M``and then save. The next cron run will pick up the new memory_limit.
 
Not only cron; those settings are only applied to the respective fpm pool.
Generally, you can use /opt/plesk/php/8.3/bin/php -i to view the effective config and the files it got loaded from.
 
Or you can edit the global php.ini for PHP 8.3. Tools & Settings > General Settings: PHP Settings > click on any PHP 8.3 handlers (php.ini is the same for all of them) > php.ini. Here you will update ``memory_limit = 128M``and then save. The next cron run will pick up the new memory_limit.
Thank you
 
Back
Top