php 7.3 正在崩潰

php 7.3 正在崩潰

堆 :

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

問題 :

該伺服器已經工作一年多了,但從昨天開始,我的 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;

相關內容