Question
- What does the PHP memory_limit setting in Plesk do?
- Can the website be sped up by increasing PHP memory_limit?
- What is the PHP memory_limit setting used for?
- Is it possible to increase website loading by increasing the PHP memory_limit?
Answer
The PHP memory_limit setting defines the maximum amount of server memory (RAM) a script is allowed to consume.
Note: It does not have a direct impact on the website's loading performance by itself and simply increasing it would not speed up your website.
This setting is a safety measure that is generally used to prevent a single website from using too much of the entire server's memory (RAM).
The recommended value for this limit depends on the PHP script used on your website and its exact memory resource needs.
Due to this, it could differ a lot based on the load of the website (if it has a lot of visitors) or the script code it is using and its internal specifics.
The default value is 128MB, however in case this amount is insufficient for the website for the reasons mentioned above, you may increase it to 256MB, especially if you encounter messages such as the following in the website error log:
PHP Fatal error: Allowed memory size of XXX bytes exhausted (tried to allocate XXX bytes)
If you already increased this value several times and such errors still occur, an error in the website script PHP code may be responsible and you should contact a website developer in order to have this issue investigated further.
Additional information
memory_limit | PHP: Description of core php.ini directives - Manual
Comments
0 comments
Please sign in to leave a comment.