Last active
May 2, 2020 07:59
-
-
Save eksiscloud/8e70ce6176e4adaf18eda399d0abd16d to your computer and use it in GitHub Desktop.
PHP-FPM: pm-pools for 8GB/4CPU VPS where is 20 - 5000 users per day
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
; DigitalOcean 4 CPU, 8 GB RAM | |
; PHP7.3-FPM | |
; If all pools hit in with full power there isn't enough RAM, I reckon. | |
; | |
; static | |
; Wordpress, 2000 - 5000 users per day | |
[www] | |
user = www-data | |
group = www-data | |
listen = /run/php/php7.3-fpm.sock | |
listen.owner = www-data | |
listen.group = www-data | |
pm = static | |
pm.max_children = 18 | |
;slowlog = /var/log/php7.3-fpm-$pool.log.slow | |
;request_slowlog_timeout = 3 | |
;request_slowlog_trace_depth = 20 | |
request_terminate_timeout = 10000 | |
;chroot = | |
;chdir = /var/www | |
security.limit_extensions = .php | |
pm.status_path = /status | |
; dynamic | |
; Wordpress, 100 - 1000 users per day | |
[dynamic] | |
user = www-data | |
group = www-data | |
listen = /run/php/php7.3-fpm-dynamic.sock | |
listen.owner = www-data | |
listen.group = www-data | |
pm = dynamic | |
pm.max_children = 18 | |
pm.start_servers = 2 | |
pm.min_spare_servers = 2 | |
pm.max_spare_servers = 6 | |
pm.max_requests = 800 | |
;slowlog = /var/log/php7.3-fpm-$pool.log.slow | |
;request_slowlog_timeout = 3 | |
;request_slowlog_trace_depth = 20 | |
request_terminate_timeout = 10000 | |
;chroot = | |
;chdir = /var/www | |
security.limit_extensions = .php | |
; ondemand | |
; Wordpress/Moodle, 20 - 500 users per day | |
[ondemand] | |
listen = /run/php/php7.3-fpm-ondemand.sock | |
user = www-data | |
group = www-data | |
listen.owner = www-data | |
listen.group = www-data | |
pm = ondemand | |
pm.max_children = 18 | |
pm.process_idle_timeout = 10s | |
pm.max_requests = 500 | |
;slowlog = /var/log/php7.3-fpm-$pool.log.slow | |
;request_slowlog_timeout = 3 | |
;request_slowlog_trace_depth = 20 | |
request_terminate_timeout = 10000 | |
;chroot = | |
;chdir = /var/www | |
security.limit_extensions = .php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment