![PHP 7.3이 충돌합니다](https://linux55.com/image/170622/PHP%207.3%EC%9D%B4%20%EC%B6%A9%EB%8F%8C%ED%95%A9%EB%8B%88%EB%8B%A4.png)
더미:
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.5 (stretch)
Release: 9.5
Codename: stretch
PHP 7.3.14-5+0~20200202.52+debian9~1.gbpa71879 (cli) (built: Feb 2 2020 07:56:57) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.14, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.14-5+0~20200202.52+debian9~1.gbpa71879, Copyright (c) 1999-2018, by
Zend Technologies
질문:
서버는 1년 넘게 작동했지만 어제 현재 PHP에 몇 가지 문제가 있습니다(희망합니다). PHP가 충돌하고 문제가 발생한 후 다시 로드되지 않는 것 같습니다(문제가 보이지 않습니다).
nginx 로그:
2020/04/07 12:51:11 [crit] 770#770: *17055 connect() to unix:/run/php/php7.3-fpm.sock
failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1,
server: ***, request: "GET /api/me HTTP/1.1", upstream:
"fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "***"
2020/04/07 12:51:11 [crit] 770#770: *17057 connect() to unix:/run/php/php7.3-fpm.sock failed
(2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: *
, request: "GET /api/seo/get? path=*** HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-
fpm.sock:", host: "***"
질문: PHP가 PID를 죽이는 데 치명적인 것이 무엇인지 아십니까? 충돌이 발생한 경우 프로세스를 재개할 수 있는 모니터를 알고 있습니까?
대체 답변: 직접 모니터링하고 php7.3-fpm을 다시 시작할 수 있지만 시간이 많이 걸립니다...
건배
편집: 의견에서 제안한 대로 아래의 /var/log/php7.3-fpm 로그 결과를 확인했습니다.
[07-Apr-2020 11:05:19] NOTICE: [pool www] child 5504 started
[07-Apr-2020 11:14:42] WARNING: [pool www] server reached
pm.max_children setting (6), consider raising it
[07-Apr-2020 11:32:18] WARNING: [pool www] server reached
pm.max_children setting (6), consider raising it
[07-Apr-2020 11:54:21] WARNING: [pool www] server reached
pm.max_children setting (6), consider raising it
[07-Apr-2020 12:02:26] WARNING: [pool www] server reached
pm.max_children setting (6), consider raising it
[07-Apr-2020 12:30:16] NOTICE: Terminating ...
[07-Apr-2020 12:30:16] NOTICE: exiting, bye-bye!
PHP 하위 노드의 보안 제한은 무엇입니까?
해결 방법 pool.d/www.conf pm 값을 다음으로 변경합니다.
pm = dynamic
pm.max_children = 50
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 10
pm.process_idle_timeout = 5s;