The platform dynamic resources optimization complements the basic implementation provided by PHP servers to bring maximum efficiency. Basically, upon changing the amount of allocated RAM and CPU resources (cloudlets count), the platform automatically adjusts the appropriate PHP directives to fit the new conditions. However, if needed, you can disable automatic configuration and provide parameters manually within your server’s configuration file.
Auto-Configuration Example
Let’s check how the parameters are changed based on the allocated resources.
1. For example, we have an environment with the Apache PHP application server inside (16 cloudlets).
The values of the prefork module configs in the /etc/httpd/conf/httpd.conf file are as follows:

2. Now, if we set a new resource limit for the Apache PHP server (32 cloudlets) and refresh the /etc/httpd/conf/httpd.conf file:

As you can see, the directive values are adjusted automatically due to the changed amount of available resources.
The same principle is applied to all other PHP application servers.
Disable Automatic Optimization
To state your custom values instead of the automatically configured directives, you need to disable the automatic optimization. Otherwise, your custom changes will be reverted during the container restart/update.
Tip: You can use the PHP_MEMORY_LIMIT and PHP_MAX_EXECUTION_TIME variables to set the PHP memory limit and maximum execution time without disabling the automatic optimization.
Currently, you need to perform the following actions based on your PHP application server type:
Note: Inappropriate directive values may cause your server instability, so it isn’t recommended to apply any manual changes unless you know exactly what you are doing.
Smart Auto-Configuration
If you want to manually change any of the auto-configured settings, you need to set the JELASTIC_AUTOCONFIG environment variable to false (disabled).

Legacy Implementation
Remove a line with the optimization mark at the beginning of the appropriate configuration file:
- Apache PHP – “# Jelastic autoconfiguration mark” within the /etc/httpd/conf/httpd.conf file

- NGINX PHP – “; Jelastic autoconfiguration mark” within the /etc/php-fpm.conf file

After the corresponding string is deleted, the parameters’ values won’t be auto-configured by the platform optimization mechanism so that you can state your custom parameters. Don’t forget to Save the file to apply the new configurations.
Auto Adjustable Settings
The type of basic requests’ handling and dispatching system varies for different PHP application servers, so the directives they use are different too. However, the functionality of such parameters could be similar. To learn more about these directives for a particular application server, navigate to the corresponding section below:



