You can configure the PHP settings for each of your Acquia Cloud environments.
To change an environment's PHP settings, complete the following steps:
- Sign in to your Acquia subscription, and then go to the Cloud > Workflow page.
- Open the menu for the environment you want to configure, and then click Configure.
In the PHP settings section, you can configure the following items:
- PHP max execution time
- PHP memory
- PHP opcode cache size
- Maximum input variables
- Maximum size of POST request
Advanced PHP settings
The following settings are for advanced users. For most websites, you should leave them at their default settings. Change them only if you are advised to do so by Acquia Support, or if you are confident that you know what you are doing. If you have Acquia Cloud Free, your website runs on a shared server, and you cannot configure your PHP settings. You can upgrade your Acquia Cloud Free subscription to a paid Acquia Cloud subscription.
Configuring PHP max execution time
You can configure the maximum amount of time any PHP process can take. If a PHP process does not complete in this amount of time, it fails and sends an error. This time limit helps to prevent PHP processes from becoming stuck and unavailable to serve new requests.
On the Configure Environment page, under PHP max execution time (secs), enter a value, in seconds, and click Save.
The default setting for PHP maximum execution time (300 seconds, or 5 minutes) is adequate for most Drupal websites on Acquia Cloud, and you should change it only when necessary.
The danger of allowing longer PHP maximum execution times is that individual page loads can occupy process slots for long periods of time, blocking other processes from using them.
Configuring PHP memory limit (Acquia Cloud Professional only)
The PHP memory limit is the maximum amount of RAM memory that a single PHP process can use. The memory used by the MySQL client counts against the PHP memory limit.
Use the PHP memory slider to increase or decrease the PHP memory limit. Click Reset to default to reset to the default setting, 128 MB per process.
The default setting for PHP memory is adequate for most Drupal websites on Acquia Cloud, and you should only change it when necessary. Increasing your PHP memory limit beyond 128M on any one environment may reduce the number of PHP processes available to handle requests across all environments on your server. Your Drupal website can run out of PHP memory. If it does, you'll see an entry in the PHP error log stating that a process ran out of RAM memory.
If your website stops working and there is an "Out of Memory" error in the PHP log, increase the PHP memory in small increments until your website is working again, and then add a safety margin of additional memory.
If the "Out of Memory" error was caused by a one-time set of conditions (for example, enabling a large set of modules), reduce the PHP memory setting after the event. If you leave the PHP memory setting too high, you won't be able to run more than a few PHP processes on a machine without running out of RAM.
Configuring PHP opcode cache size (Acquia Cloud Professional only)
Using an opcode cache significantly improves PHP performance. Since PHP is an interpreted programming language, each time a PHP script is called, it has to be reinterpreted. An opcode cache saves these scripts as machine code in memory the first time they are run, eliminating the time needed for reinterpretation on subsequent requests.
Acquia's test results indicate that using an opcode cache generally offers a three-fold to four-fold increase in performance. To improve website performance, Acquia Cloud implements opcode caching by default on all websites, using OPcache.
Use the slider to increase or decrease the PHP opcode cache size. The PHP opcode cache is shared among all processes. Click Reset to default to reset to the default setting, 96 MB.
Maximum input variables (Acquia Cloud Professional only)
You can set the maximum number of input variables that can be accepted. This limit (the PHP
max_input_vars setting) is applied separately to
You might want to change this value if your website includes very large or complex form inputs and you are getting PHP warnings about input variables exceeding the limit. The default value is 1000. The highest value you can set in the Acquia Cloud interface is 2500. If your website requires a higher value (or if you have an Acquia Cloud Enterprise website), you can file a ticket for Acquia to set a higher value. However, higher values can lead to security vulnerabilities, so we recommend that you do not set the value higher than 5000. As an alternative, you should consider redesigning your website's forms to be smaller and less complex.
Maximum size of POST request (Acquia Cloud Professional only)
You can set the maximum size of a POST that can be accepted (the PHP
post_max_size setting). This value affects the maximum size of file uploads on your website. Generally, this value should be smaller than the PHP memory limit. The default value is 256 MB. Larger sized POSTs are more susceptible to failure.