The primary source of this error is your host's PHP memory_limit being insufficient for your process's requirements. In such instances, it becomes necessary to enhance the host memory limit to ensure process completion.
The PHP memory_limit can be configured to limit the amount of memory scripts are permitted to allocate, measured in bytes. This configuration is beneficial to prevent ill-coded scripts from consuming the entire server's memory.
Increasing PHP memory_limits might be necessitated for various other purposes. The default memory limit of PHP can differ, contingent on the server's setup.
The default PHP settings suffice for operating most websites with every PHP installation. However, to cater to specific requirements of a website, occasional adjustments in PHP settings might be requisite. Accordingly, it might be imperative to augment the memory_limit on your site to facilitate the conclusion of a process.
For example, let's say you want to change memory_limit for example.com
First, check what PHP version you run on the example.com domain.
In your SSH run:
Code: Select all
sudo /usr/local/vesta/bin/v-get-php-version-of-domain example.com
Code: Select all
8.0
Code: Select all
sudo mcedit /etc/php/8.0/fpm/pool.d/example.com.conf
Edit:
Code: Select all
php_admin_value[memory_limit] = 512M
Code: Select all
sudo systemctl restart php8.0-fpm