PHP 8.0.20 fpm pool keeps restarting, FreeBSD 13, with Apache 2.4

[email protected] (David Mehler)
Newsgroups php.general
Message-ID <CAPORhP6U8X9pPCyXKWSqWkivY9KTrjXQLaLg3LjNM7Fb=9ewKg@mail.gmail.com>
Hello,

I'm running Apache 2.4 on FreeBSD 13. I was running PHP 7 then decided
an upgrade to 8. Ever since then I've not been able to get my test php
script to work. Checking the logs both Apache error and php-fpm it is
looking like the php-fpm process is dying then respawning, atempted
connections take a while then eventually time out with a 503 message.
The below is debug log from php-fpm.log while atempting a connection
to the info script.

#service php-fpm start
Performing sanity check on php-fpm configuration:
[15-Jul-2022 18:11:08.474913] NOTICE: pid 31874, fpm_conf_init_main(),
line 1813: configuration file /usr/local/etc/php-fpm.conf test is
successful

Starting php_fpm.
#tail -f php-fpm.log
[15-Jul-2022 18:11:20.800009] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:21.820314] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:22.840338] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:23.860302] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:24.892759] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:25.920230] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:26.940282] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:27.960269] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:28.980300] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:30.000459] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:31.020285] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:32.040306] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:33.060365] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:34.080310] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:35.100271] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:36.120335] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:37.140300] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:38.160282] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:39.180275] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:40.200509] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:41.220247] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:42.240394] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:43.260343] DEBUG: pid 32691,
fpm_pctl_perform_idle_server_maintenance(), line 398: [pool www]
currently 0 active children, 2 spare children, 2 running children.
Spawning rate 1
[15-Jul-2022 18:11:43.639098] DEBUG: pid 32691, fpm_got_signal(), line
82: received SIGCHLD
[15-Jul-2022 18:11:43.639176] DEBUG: pid 32691, fpm_event_loop(), line
430: event module triggered 1 events
[15-Jul-2022 18:11:43.639257] WARNING: pid 32691, fpm_children_bury(),
line 259: [pool www] child 32831 exited with code 1 after 35.132697
seconds from start
[15-Jul-2022 18:11:43.639281] DEBUG: pid 32691, fpm_children_make(),
line 407: blocking signals before child birth
[15-Jul-2022 18:11:43.640065] DEBUG: pid 32691, fpm_children_make(),
line 431: unblocking signals, child born
[15-Jul-2022 18:11:43.640106] NOTICE: pid 32691, fpm_children_make(),
line 437: [pool www] child 35726 started
[15-Jul-2022 18:11:43.710528] DEBUG: pid 32691, fpm_got_signal(), line
82: received SIGCHLD
[15-Jul-2022 18:11:43.710595] DEBUG: pid 32691, fpm_event_loop(), line
430: event module triggered 1 events
[15-Jul-2022 18:11:43.710625] WARNING: pid 32691, fpm_children_bury(),
line 259: [pool www] child 35726 exited with code 1 after 0.070527
seconds from start
...

The rest repeats. Apache gives me an error dispatching message given
how hard fpm is working I'm not surprised it's timing out.

#ls -l phpinfo.php
-rw-r--r--  1 root  www  20 Jul 12 15:33 phpinfo.php
#cat info.php
<?php
phpinfo();
?>
#cat /usr/local/etc/php-fpm.conf
[global]
pid = run/php-fpm.pid
error_log = log/php-fpm.log
log_level = debug
process_control_timeout = 60
process.max = 128
daemonize = yes
include=/usr/local/etc/php-fpm.d/*.conf
#cat /usr/local/etc/php-fpm.d/www.conf
[www]
user = www
group = www
listen = 127.0.0.1:9000
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
pm = dynamic
pm.max_children = 50
pm.start_servers = 2
pm.min_spare_servers = 2
pm.max_spare_servers = 4
pm.process_idle_timeout = 10s;
pm.max_requests = 500
request_terminate_timeout = 300
php_admin_value[error_log] = /var/log/php-fpm/www-error.log
php_admin_flag[log_errors] = on

Help appreciated.
Thanks.
Dave.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.