-
-
Notifications
You must be signed in to change notification settings - Fork 654
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #410 from cytopia/php-7-4
Adding PHP-FPM 7.4-dev (Seven Four)
- Loading branch information
Showing
20 changed files
with
381 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# PHP-FPM config directory | ||
|
||
## General | ||
|
||
* Add you custom php-fpm.conf files into this directory. | ||
* Only files ending by `.conf` will be enabled | ||
* Only files ending by `.conf` are ignored by git | ||
|
||
|
||
## Example files | ||
|
||
This directory also holds three example files: | ||
|
||
| File | Description | | ||
|---------------------------------|---------------------------------------------| | ||
| `devilbox-fpm.conf-default` | Represents current PHP-FPM default settings | | ||
| `devilbox-fpm.conf-pm_dynamic` | Example settings for dynamic workers | | ||
| `devilbox-fpm.conf-pm_ondemand` | Example settings for ondemand workers | | ||
|
||
* Do not edit these example files! | ||
* Copy them to a new file (in case you want to use them) | ||
|
||
|
||
## Worker configuration | ||
|
||
When changing worker processes or scheduler, the following commands will come in handy | ||
to monitor number of processes and memory consumption. | ||
|
||
```bash | ||
# Show current PHP-FPM child memory consumption in MB | ||
ps -ylC php-fpm --sort:rss | awk '!/RSS/ { s+=$8 } END { printf "%dM\n", s/1024 }' | ||
|
||
# (repeatedly) show current PHP-FPM child memory consumption in MB | ||
watch --interval=1 "ps -ylC php-fpm --sort:rss | awk '"'!'"/RSS/ { s+=\$8 } END { printf \"%dM\n\", s/1024 }'" | ||
|
||
# (repeatedly) Current number of PHP-FPM childs | ||
watch --interval=1 "ps auxw | grep -E 'php-(cgi|fpm)' | grep -vE 'grep|master' | wc -l" | ||
``` | ||
|
||
|
||
## Overwriting | ||
|
||
If multiple `.conf` files are present in this directory specifying different values for the | ||
same settings, the last file (alphabetically by filename) will overwrite any previous values. | ||
|
||
|
||
## Compatibility | ||
|
||
**Note:** | ||
|
||
PHP-FPM 5.2 uses XML-style configuration and does not allow includes. | ||
If you want to change php-fpm.conf for PHP-FPM 5.2 you need to adjust the main configuration file. | ||
|
||
See `php-fpm-5.2/` directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
; ############################################################ | ||
; Devilbox php-fpm.conf: Current default settings | ||
; ############################################################ | ||
; | ||
; Information | ||
; ----------- | ||
; * Do not edit this file (it belongs to git) | ||
; * This file shows example settings that are currently effective | ||
; * If this file is enabled, nothing will change as it reflects the current default settings | ||
; | ||
; How to enable? | ||
; -------------- | ||
; * Copy this file to another file with ".conf" extension | ||
; * Only files with ".conf" extensions will be applied by PHP-FPM | ||
|
||
|
||
; ### | ||
; ### PHP-FPM global settings | ||
; ### | ||
; | ||
[global] | ||
|
||
; Error log level. Possible values: alert, error, warning, notice, debug. Default value: notice. | ||
log_level = notice | ||
|
||
|
||
|
||
; ### | ||
; ### Pool configuratoin | ||
; ### | ||
|
||
[www] | ||
|
||
; The timeout for serving a single request after which the worker process will be killed. | ||
; This option should be used when the 'max_execution_time' ini option does not stop script | ||
; execution for some reason. | ||
request_terminate_timeout = 120s | ||
|
||
|
||
; A maximum of backlog incoming connections will be queued for processing. | ||
; If a connection request arrives with the queue full the client may receive an error with an | ||
; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, | ||
; the request may be ignored so that retries may succeed. | ||
; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections | ||
; are silently truncated | ||
listen.backlog = 1024 | ||
|
||
|
||
; static - the number of child processes is fixed (pm.max_children). | ||
; | ||
; dynamic - the number of child processes is set dynamically based on the following directives: | ||
; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. | ||
; | ||
; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where | ||
; pm.start_servers are started when the service is started. | ||
pm = ondemand | ||
|
||
; The maximum number of child processes to be created | ||
pm.max_children = 50 | ||
|
||
; The number of child processes created on startup. Used only when pm is set to dynamic. | ||
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. | ||
pm.start_servers = 4 | ||
|
||
; The desired minimum number of idle server processes. | ||
pm.min_spare_servers = 2 | ||
|
||
; The desired maximum number of idle server processes. | ||
pm.max_spare_servers = 6 | ||
|
||
; The number of requests each child process should execute before respawning. | ||
; This can be useful to work around memory leaks in 3rd party libraries. | ||
; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. | ||
; Default value: 0. | ||
pm.max_requests = 500 | ||
|
||
; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand | ||
pm.process_idle_timeout = 10s | ||
|
||
; vim: set ft=dosini: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
; ############################################################ | ||
; # Devilbox php-fpm.conf: dynamic example | ||
; ############################################################ | ||
; | ||
; Information | ||
; ----------- | ||
; * Do not edit this file (it belongs to git) | ||
; * This file show a possible dynamic example configuration | ||
; * If this file is enabled, it will overwrite the current worker settings | ||
; | ||
; How to enable? | ||
; -------------- | ||
; * Copy this file to another file with ".conf" extension | ||
; * Only files with ".conf" extensions will be applied by PHP-FPM | ||
|
||
|
||
; ### | ||
; ### Pool configuratoin | ||
; ### | ||
|
||
[www] | ||
|
||
; dynamic - the number of child processes is set dynamically based on the following directives: | ||
pm = dynamic | ||
|
||
; The maximum number of child processes to be created | ||
pm.max_children = 50 | ||
|
||
; The number of child processes created on startup. Used only when pm is set to dynamic. | ||
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. | ||
pm.start_servers = 4 | ||
|
||
; The desired minimum number of idle server processes. | ||
pm.min_spare_servers = 2 | ||
|
||
; The desired maximum number of idle server processes. | ||
pm.max_spare_servers = 6 | ||
|
||
; The number of requests each child process should execute before respawning. | ||
; This can be useful to work around memory leaks in 3rd party libraries. | ||
; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. | ||
; Default value: 0. | ||
pm.max_requests = 500 | ||
|
||
|
||
; vim: set ft=dosini: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
; ############################################################ | ||
; # Devilbox php-fpm.conf: ondemand example | ||
; ############################################################ | ||
; | ||
; Information | ||
; ----------- | ||
; * Do not edit this file (it belongs to git) | ||
; * This file show a possible ondemand example configuration | ||
; * If this file is enabled, it will overwrite the current worker settings | ||
; | ||
; How to enable? | ||
; -------------- | ||
; * Copy this file to another file with ".conf" extension | ||
; * Only files with ".conf" extensions will be applied by PHP-FPM | ||
|
||
|
||
; ### | ||
; ### Pool configuratoin | ||
; ### | ||
|
||
[www] | ||
|
||
; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where | ||
; pm.start_servers are started when the service is started. | ||
pm = ondemand | ||
|
||
; The maximum number of child processes to be created | ||
pm.max_children = 50 | ||
|
||
; The number of requests each child process should execute before respawning. | ||
; This can be useful to work around memory leaks in 3rd party libraries. | ||
; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. | ||
; Default value: 0. | ||
pm.max_requests = 500 | ||
|
||
; The number of seconds after which an idle process will be killed. | ||
pm.process_idle_timeout = 10s | ||
|
||
; vim: set ft=dosini: |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# PHP ini directory | ||
|
||
## General | ||
|
||
* Add you custom php.ini files into this directory. | ||
* Only files ending by `.ini` will be enabled | ||
* Only files ending by `.ini` are ignored by git | ||
|
||
|
||
## Example files | ||
|
||
This directory also holds two example files: | ||
|
||
| File | Description | | ||
|----------------------------|-----------------------------------------| | ||
| `devilbox-php.ini-default` | Represents current PHP default settings | | ||
| `devilbox-php.ini-xdebug ` | Example settings for Xdebug | | ||
|
||
* Do not edit these example files! | ||
* Copy them to a new file (in case you want to use them) | ||
|
||
|
||
## Overwriting | ||
|
||
If multiple `.ini` files are present in this directory specifying different values for the | ||
same settings, the last file (alphabetically by filename) will overwrite any previous values. |
Oops, something went wrong.