• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Resolved How to increase the PHP memory

TheBeatBali

Basic Pleskian
Server operating system version
Ubuntu 18.04.5 LTS
Plesk version and microupdate number
Plesk Obsidian v18.0.60_build1800240422.01 os_Ubuntu 18.04
How can I increase the PHP memory limit on the Plesk Performance and security settings. The highest setting possible is 512M. How can I change that to 1000 or even 2000M? See attached image.
I believe there is 8GB of ram on the server.
See attached.
Thank you
 

Attachments

  • Screenshot 2024-06-25 092855.png
    Screenshot 2024-06-25 092855.png
    125.5 KB · Views: 13
  • Screenshot 2024-06-25 093451.png
    Screenshot 2024-06-25 093451.png
    24.3 KB · Views: 14
The field is a combo field, meaning you can either use it as a drop down or use it as an input field. Nothing stops you from entering values like "2G" directly.
 
The field is a combo field, meaning you can either use it as a drop down or use it as an input field. Nothing stops you from entering values like "2G" directly.
Hi thanks for the info. I duly upped the memory to 2G. However, I can't see any opening speed improvement.
 
That's not how it works. Adding more memory to PHP can even slow down a website.

Use a Website Performance Tool. Tools like Google PageSpeed Insights or Gtmetrix can analyze your website and provide detailed insights into what's slowing it down. These tools highlight issues such as large images, unoptimized code, and server response times.

Consider adding a cache to your website. If it's WordPress, use a plugin like W3 Total Cache.
 
Increasing the limit up to 2GB on a server with 8GB, from my point of view, increases the risk of unavailability for websites. Let's say 2GB is required by the OS, database, services, etc. It means only 6GB is available for other processes.
With the 2GB limit, only 3 php workers could eat all available memory (by default, pm.max_children = 10). The idea of the limit is to prevent issues with poorly written script, see PHP: Description of core php.ini directives - Manual.

If the memory limit is an issue, you will see some error that not enough memory for a php worker process.
Do you have any errors related to slow performance?
 
Last edited:
If you want to make your site faster I would try to change the instance type or server.

Use the new Performance Booster in Plesk -> Tools & Settings -> General Settings.
 
Increasing the limit up to 2GB on a server with 8GB, from my point of view, increases the risk of unavailability for websites. Let's say 2GB is required by the OS, database, services, etc. It means only 6GB is available for other processes.
With the 2GB limit, only 3 php workers could eat all available memory (by default, pm.max_children = 10). The idea of the limit is to prevent issues with poorly written script, see PHP: Description of core php.ini directives - Manual.

If the memory limit is an issue, you will see some error that not enough memory for a php worker process.
Do you have any errors related to slow performance?
There have been a lot of notifications since a long time like this attached.
But the last notification was sometime yesterday. See attached please.
 

Attachments

  • Screenshot 2024-06-27 075758.png
    Screenshot 2024-06-27 075758.png
    84.6 KB · Views: 6
If you want to make your site faster I would try to change the instance type or server.

Use the new Performance Booster in Plesk -> Tools & Settings -> General Settings.
I tried the performance booster on our staging site. Pingdom before - Load time 7.83 s, after - Load time 17.04 s. It also changed what the page looks like to a previous version. So it didn't do much good. Now, how do I revert/change it back? I'm not real good at SSH. Any other way?
 
That's not how it works. Adding more memory to PHP can even slow down a website.

Use a Website Performance Tool. Tools like Google PageSpeed Insights or Gtmetrix can analyze your website and provide detailed insights into what's slowing it down. These tools highlight issues such as large images, unoptimized code, and server response times.

Consider adding a cache to your website. If it's WordPress, use a plugin like W3 Total Cache.
Plesk has its own caching extension, which I have been using. Is there a problem with that?
 
If you want to make your site faster I would try to change the instance type or server.

Use the new Performance Booster in Plesk -> Tools & Settings -> General Settings.
I tried the performance booster on our staging site. Pingdom before - Load time 7.83 s, after - Load time 17.04 s. It also changed what the page looks like to a previous version. So it didn't do much good. Now, how do I revert/change it back? I'm not real good at SSH. Any other way?
Ok I managed to revert the settings via ssh, but the website version is still the old one and still runs at 12s
 
Performance Booster does not change your website version. It applies no changes to your content files at all.
 
Performance Booster does not change your website version. It applies no changes to your content files at all.
Yes, you would think the same, but something did change the page after I clicked apply. I have now changed it back.
Not much succcess with the performance booster
 
There have been a lot of notifications since a long time like this attached.
But the last notification was sometime yesterday. See attached please.
I would recommend reading the next thread Issue - Apache & PHP-FPM running out of memory.

It is not an error like "PHP Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes) ", just a warning when the Monitoring threshold limit is reached.

Why it is happened? The default value for this threshold is `>20%`. 20% of 8GB is 1.6GB. With your newly configured memory limit (2GB), it means even one PHP worker could reach the threshold if it is a poorly written script.
 
I would recommend reading the next thread Issue - Apache & PHP-FPM running out of memory.

It is not an error like "PHP Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes) ", just a warning when the Monitoring threshold limit is reached.

Why it is happened? The default value for this threshold is `>20%`. 20% of 8GB is 1.6GB. With your newly configured memory limit (2GB), it means even one PHP worker could reach the threshold if it is a poorly written script.
I have been receiving the same error for months - before I upped the memory from 512mb to 2G, Now it is 1G. I will read the next thread. Thanks
 
Back
Top