Skip to content

Instantly share code, notes, and snippets.

@EvanK

EvanK/php.ini Secret

Last active December 28, 2015 06:29
Show Gist options
  • Select an option

  • Save EvanK/dad56bd0695af7786b77 to your computer and use it in GitHub Desktop.

Select an option

Save EvanK/dad56bd0695af7786b77 to your computer and use it in GitHub Desktop.
Hardcoding values in `$REPO/provisioning/group_vars/webservers` results in the below value for `/etc/php5/apache2/php.ini` and contents of `/etc/apache2/prefork.conf`
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 320M
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
StartServers 3
MinSpareServers 3
MaxSpareServers 6
MaxClients 42
ServerLimit 42
MaxRequestsPerChild 500
</IfModule>
---
domain: example.com
mysql:
name: database_name
user: database_user
password: database_password
host: localhost
php_memory_limit: 320
reserved_memory_mysql: 128
reserved_memory_system: 256
apache_start_servers: 3
apache_min_spare_servers: 3
apache_max_spare_servers: 6
apache_max_clients: 42
apache_max_requests_per_child: 500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment