现象描述:腾讯云上用宝塔面板部署站点之后,配置了域名IP,直接点击IP链接,网页连接很慢,一段时间后返回502 Bad Gateway。(初次建站的时候都还一切正常,后来就不行了,重新部署也是一样的,不知道是什么原因,求助!)
网站异常日志:
2025/04/21 20:08:44 [error] 87081#0: *345 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 106.59.209.3, server: 132.232.229.196, request: "GET /index.php?s=/store/passport/login HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi-73.sock:", host: "132.232.229.196"
Slow.log
[21-Apr-2025 20:07:34] [pool www] pid 92043
script_filename = /www/wwwroot/testkm.cn/public/index.php
[0x00007f6e11c1fcf0] curl_exec() /www/wwwroot/testkm.cn/application/common.php:160
[0x00007f6e11c1fc50] curlPost() /www/wwwroot/testkm.cn/application/store/controller/Controller.php:138
[0x00007f6e11c1fa30] wxAuth() /www/wwwroot/testkm.cn/application/store/controller/Controller.php:24
[0x00007f6e11c1f970] _initialize() /www/wwwroot/testkm.cn/thinkphp/library/think/Controller.php:59
[0x00007f6e11c1f7d0] __construct() /www/wwwroot/testkm.cn/thinkphp/library/think/App.php:359
[0x00007f6e11c1f770] newInstanceArgs() /www/wwwroot/testkm.cn/thinkphp/library/think/App.php:359
[0x00007f6e11c1f640] invokeClass() /www/wwwroot/testkm.cn/thinkphp/library/think/Loader.php:479
[0x00007f6e11c1f470] controller() /www/wwwroot/testkm.cn/thinkphp/library/think/App.php:580
[0x00007f6e11c1eae0] module() /www/wwwroot/testkm.cn/thinkphp/library/think/App.php:456
[0x00007f6e11c1e7f0] exec() /www/wwwroot/testkm.cn/thinkphp/library/think/App.php:139
[0x00007f6e11c1e170] run() /www/wwwroot/testkm.cn/thinkphp/start.php:19
[0x00007f6e11c1e0f0] [INCLUDE_OR_EVAL]() /www/wwwroot/testkm.cn/public/index.php:21
php-fpm.log
[21-Apr-2025 20:07:34] WARNING: [pool www] child 92043, script '/www/wwwroot/testkm.cn/public/index.php' (request: "GET /index.php?s=/store/passport/login") executing too slow (30.968534 sec), logging
[21-Apr-2025 20:07:34] NOTICE: child 92043 stopped for tracing
[21-Apr-2025 20:07:34] NOTICE: about to trace 92043
[21-Apr-2025 20:07:34] NOTICE: finished trace of 92043
[21-Apr-2025 20:08:44] WARNING: [pool www] child 92043, script '/www/wwwroot/testkm.cn/public/index.php' (request: "GET /index.php?s=/store/passport/login") execution timed out (100.978363 sec), terminating
[21-Apr-2025 20:08:44] WARNING: [pool www] child 92043 exited on signal 15 (SIGTERM) after 100.981196 seconds from start
[21-Apr-2025 20:08:44] NOTICE: [pool www] child 92552 started
调高级别后的php-fpm.log
[21-Apr-2025 20:45:11.924323] DEBUG: pid 103963, fpm_pctl_perform_idle_server_maintenance(), line 361: [pool www] currently 0 active children, 0 spare children
[21-Apr-2025 20:45:12.060873] DEBUG: pid 103963, fpm_children_make(), line 428: [pool www] child 104559 started
[21-Apr-2025 20:45:12.060923] DEBUG: pid 103963, fpm_pctl_on_socket_accept(), line 535: [pool www] got accept without idle child available .... I forked
[21-Apr-2025 20:45:12.060930] DEBUG: pid 103963, fpm_event_loop(), line 430: event module triggered 1 events
[21-Apr-2025 20:45:12.116091] DEBUG: pid 103963, fpm_event_loop(), line 430: event module triggered 1 events
[21-Apr-2025 20:45:12.925964] DEBUG: pid 103963, fpm_pctl_perform_idle_server_maintenance(), line 361: [pool www] currently 1 active children, 0 spare children
[21-Apr-2025 20:45:46.863907] WARNING: pid 103963, fpm_request_check_timed_out(), line 265: [pool www] child 104559, script '/www/wwwroot/testkm.cn/public/index.php' (request: "GET /index.php?s=/store/passport/login") executing too slow (34.747749 sec), logging
[21-Apr-2025 20:45:46.864018] DEBUG: pid 103963, fpm_got_signal(), line 82: received SIGCHLD
[21-Apr-2025 20:45:46.864037] DEBUG: pid 103963, fpm_event_loop(), line 430: event module triggered 1 events
[21-Apr-2025 20:45:46.864051] NOTICE: pid 103963, fpm_children_bury(), line 234: child 104559 stopped for tracing
[21-Apr-2025 20:45:46.864057] NOTICE: pid 103963, fpm_php_trace(), line 200: about to trace 104559
[21-Apr-2025 20:45:46.864415] NOTICE: pid 103963, fpm_php_trace(), line 228: finished trace of 104559
[21-Apr-2025 20:45:46.955552] DEBUG: pid 103963, fpm_pctl_perform_idle_server_maintenance(), line 361: [pool www] currently 1 active children, 0 spare children