Nginx php-fpm 502 error report: it is still not solved after the setting parameters are adjusted.

< H2 > related errors: < / H2 >
  • Nginx Error Log
recv() failed (104: Connection reset by peer) while reading response header from upstream
  • PHP FPM Error Log
449 [04-Jan-2019 10:52:30] WARNING: [pool www] child 25054 exited on signal 11 (SIGSEGV - core dumped) after 47484.155316 seconds from start
450 [04-Jan-2019 10:52:30] NOTICE: [pool www] child 1310 started
451 [04-Jan-2019 11:23:24] WARNING: [pool www] child 25033 exited on signal 11 (SIGSEGV - core dumped) after 49338.447068 seconds from start
452 [04-Jan-2019 11:23:24] NOTICE: [pool www] child 1857 started
453 [04-Jan-2019 11:46:21] WARNING: [pool www] child 25052 exited on signal 11 (SIGSEGV - core dumped) after 50715.557187 seconds from start
454 [04-Jan-2019 11:46:21] NOTICE: [pool www] child 2263 started
455 [04-Jan-2019 11:54:20] WARNING: [pool www] child 25038 exited with code 1 after 51193.974856 seconds from start
456 [04-Jan-2019 11:54:20] NOTICE: [pool www] child 2378 started
457 [04-Jan-2019 12:23:16] WARNING: [pool www] child 1005 exited on signal 11 (SIGSEGV - core dumped) after 6101.226650 seconds from start
< H2 > current PHP-FPM parameter configuration: < / H2 >
115 ; The number of child processes created on startup.
116 ; Note: Used only when pm is set to "dynamic"
117 ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
118 pm.start_servers = 40
119
120 ; The desired minimum number of idle server processes.
121 ; Note: Used only when pm is set to "dynamic"
122 ; Note: Mandatory when pm is set to "dynamic"
123 pm.min_spare_servers = 20
124
125 ; The desired maximum number of idle server processes.
126 ; Note: Used only when pm is set to "dynamic"
127 ; Note: Mandatory when pm is set to "dynamic"
128 pm.max_spare_servers = 60
129
130 ; The number of seconds after which an idle process will be killed.
131 ; Note: Used only when pm is set to "ondemand"
132 ; Default Value: 10s
133 ; pm.process_idle_timeout = 10s;
134
135 ; The number of requests each child process should execute before respawning.
136 ; This can be useful to work around memory leaks in 3rd party libraries. For
137 ; endless request processing specify "0". Equivalent to PHP_FCGI_MAX_REQUESTS.
138 ; Default Value: 0
139 ; pm.max_requests = 0
now the problem is that increasing the parameters does not solve the problem: it may be because the execution of PHP is too slow, but I have tested it separately, and the execution of each API will not exceed 100ms , so I would like to ask what the problem may be?

the server is free on Tencent Cloud: 1 core 1 GB 5 Mbps

Apr.20,2022

1G of memory is too high for you, right?


https://blog.linuxeye.cn/414....


frequent memory errors occur in the fpm log, which should be due to insufficient memory. Take a look at how much memory is occupied by each fpm peak and multiply by the number of fpm processes

either add memory
or limit the number of processes


take a look at the system log, maybe you can find out the problem

/ var/log/message


is currently suspected to be a problem with PHP 7.3 , because it will be fine after switching back to 7.0 , and I feel 7.3 unstable

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b32a38-2be32.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b32a38-2be32.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?