I have a bit of a weird situation with php-fpm. All of a sudden for the past few nights at around 3AM a particular web server that runs apache + php-fpm starts behaving oddly.
The server load goes up to 500/600 and I can't figure out why. Web service stops and in the php-fpm logs I see this:
In the php-fpm logs I see that it stops logging and the logs just jump in time:
/var/log/messages just show connections piling up
If I manually kill the php-fpm processes things are eventually fine again, but even doing killall -9 php-fpm takes a long time.
I'm on 13.1-RELEASE FreeBSD 13.1-RELEASE and php74-7.4.29
I also tried doing a truss -p on one of the php-fpm processes but it didn't print anything, maybe because of the high load (?)
How can I debug this further ? It will happen again for sure tonight.
The server load goes up to 500/600 and I can't figure out why. Web service stops and in the php-fpm logs I see this:
Code:
[Wed Nov 30 03:02:50.264359 2022] [proxy:error] [pid 82157:tid 34395073792] (54)Connection reset by peer: AH00957: FCGI: attempt to con
nect to 127.0.0.1:9000 (127.0.0.1:9000) failed
In the php-fpm logs I see that it stops logging and the logs just jump in time:
Code:
[30-Nov-2022 03:02:27] NOTICE: [pool www] child 81068 exited with code 0 after 1118.758260 seconds from start
[30-Nov-2022 03:02:27] NOTICE: [pool www] child 82080 started
[30-Nov-2022 03:13:55] WARNING: [pool www] child 82053 exited on signal 9 (SIGKILL) after 746.754336 seconds from start
[30-Nov-2022 03:13:55] NOTICE: [pool www] child 82226 started
Code:
Nov 30 03:02:50 gomn-2 kernel: sonewconn: pcb 0xfffff8002cf8b7c0 (127.0.0.1:9000 (proto 6)): Listen queue overflow: 193 already in queue awaiting acceptance (1 occurrences)
Nov 30 03:03:50 gomn-2 kernel: sonewconn: pcb 0xfffff8002cf8b7c0 (127.0.0.1:9000 (proto 6)): Listen queue overflow: 193 already in queue awaiting acceptance (454 occurrences)
Nov 30 03:04:50 gomn-2 kernel: sonewconn: pcb 0xfffff8002cf8b7c0 (127.0.0.1:9000 (proto 6)): Listen queue overflow: 193 already in queue awaiting acceptance (426 occurrences)
I'm on 13.1-RELEASE FreeBSD 13.1-RELEASE and php74-7.4.29
I also tried doing a truss -p on one of the php-fpm processes but it didn't print anything, maybe because of the high load (?)
How can I debug this further ? It will happen again for sure tonight.