Symptoms
-
When updating Nextcloud at Domains > example.com > Nextcloud > Update, the operation fails with:
Execution filemng has failed with exit code 255, stdout: #!/usr/bin/env php Nextcloud Updater - version: v20.0.0beta4-11-g68fa0d4 Step 5 is currently in process. Please call this command later. , stderr:
-
The following error message is logged in
/var/log/plesk/panel.log
with Plesk debug mode enabled:PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 155926016 bytes) in phar:///var/www/vhosts/example.com/httpdocs/nextcloud_folder/updater/updater.phar/lib/Updater.php on line 637
Cause
Nextcloud update requires more memory_limit
than it is set in PHP handler configuration.
Resolution
-
Connect to the Plesk server via SSH.
-
Run the following command, substituting
X.X
with a PHP version used on the domain:Note: Replace
sys_user
with real subscription system user name andnextcloud_folder
with folder where Nextcloud is installed.# sudo -u sys_user /opt/plesk/php/X.X/bin/php -d memory_limit=1024M /var/www/vhosts/example.com/httpdocs/nextcloud_folder/occ maintenance:repair
-
Go to Tools & Settings > PHP Settings > X.X and switch to the php.ini tab.
-
Set the
memory_limit
directive to512M
:memory_limit = 512M
-
Click OK to apply the changes.
-
Update Nextcloud again at Domains > example.com > Nextcloud > Update.