На сервере 4 запущенных приложения, 2 php и 2 js, у него 8 ядер и 16 ГБ ОЗУ.
В логах php такие строки:
Код: Выделить всё
WARNING: [pool web] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 10 idle, and 31 total children
WARNING: [pool web] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 53 total children
WARNING: [pool web] server reached pm.max_children setting (64), consider raising it
Код: Выделить всё
NOTICE: Terminating ...
NOTICE: exiting, bye-bye!
NOTICE: fpm is running, pid 4182079
NOTICE: ready to handle connections
NOTICE: systemd monitor interval set to 10000ms
Код: Выделить всё
ps -ylC php-fpm --sort:rss
S UID PID PPID C PRI NI RSS SZ WCHAN TTY TIME CMD
S 0 1623 1532 0 80 0 22332 20315 ep_pol ? 00:00:02 php-fpm
S 33 224785 1623 0 80 0 32404 24662 inet_c ? 00:00:03 php-fpm
S 33 2094 1623 0 80 0 33164 25185 inet_c ? 00:00:03 php-fpm
S 33 2093 1623 0 80 0 34428 25171 inet_c ? 00:00:04 php-fpm
Код: Выделить всё
free -hl
total used free shared buff/cache available
Mem: 15Gi 7.1Gi 2.2Gi 83Mi 6.5Gi 8.3Gi
Low: 15Gi 13Gi 2.2Gi
High: 0B 0B 0B
Swap: 4.0Gi 8.0Mi 4.0Gi
Код: Выделить всё
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
Если Я делаю такие настройки:
Код: Выделить всё
pm.max_children = 6
pm.start_servers = number of processor cores х 4
pm.min_spare_servers = number of processor cores х 2
pm.max_spare_servers = number of processor cores х 4
Подробнее здесь: https://stackoverflow.com/questions/790 ... the-server
Мобильная версия