Php7.2-fpm does not start, others *-fpm work

For some reason, php7.2-fpm doesn’t work, while the others do.
I tried to restart it - no result.
The panel version is 1.9.0 - alpha

/var/log/php7.2-fpm.log [B—] 0 L:[ 1+ 0 1/ 45] (0 /3558b) 0091 0x05B []
[13-Oct-2024 18:36:21] NOTICE: fpm is running, pid 90121
[13-Oct-2024 18:36:21] NOTICE: ready to handle connections
[13-Oct-2024 18:36:21] NOTICE: systemd monitor interval set to 10000ms
[13-Oct-2024 18:36:21] NOTICE: Terminating …
[13-Oct-2024 18:36:21] NOTICE: exiting, bye-bye!
[13-Oct-2024 18:36:21] NOTICE: fpm is running, pid 90151
[13-Oct-2024 18:36:21] NOTICE: ready to handle connections
[13-Oct-2024 18:36:21] NOTICE: systemd monitor interval set to 10000ms
[13-Oct-2024 18:40:35] NOTICE: Terminating …
[13-Oct-2024 18:40:35] NOTICE: exiting, bye-bye!
[13-Oct-2024 13:32:34] ERROR: An another FPM instance seems to already listen on /run/php/php8.3-fpm-xxx.xx.xx.sock
[13-Oct-2024 13:32:34] ERROR: An another FPM instance seems to already listen on /run/php/php8.3-fpm-xxx.xx.xx.sock
[13-Oct-2024 13:32:34] ERROR: FPM initialization failed

P.S. The panel is installed on a clean Ubuntu 24.04.1 system
The package tzdata-legacy was added to the system because otherwise all Wordpress sites died with the error “Fatal error: Uncaught Exception: DateTimeZone::_construct(): Unknown or bad timezone”

I’m wondering why the conf for domain xxx.xx.xx is adding a php8.3 sock but the conf file is on php7.2.

php -v | head -n1
grep -r 'php8.3-fpm.*\.sock$' /etc/php/
1 Like

archive@web:~$ php -v | head -n1
PHP 8.3.12 (cli) (built: Sep 27 2024 03:53:29) (NTS)
archive@web:~$ grep -r ‘php8.3-fpm.*.sock$’ /etc/php/
/etc/php/8.3/fpm/pool.d/dummy.conf:listen = /run/php/php8.3-fpm.dummy.sock
/etc/php/8.3/fpm/pool.d/web.xxx.xx.xx.conf:listen = /run/php/php8.3-fpm-web.xxx.xx.xx.sock
/etc/php/7.2/fpm/pool.d/ххх.хх.хх.conf:listen = /run/php/php8.3-fpm-ххх.хх.хх.sock

I don’t know how that conf file was created but if your domain xxx.xx.xx uses php8.3, remove that conf file from php7.2 dir,

rm /etc/php/7.2/fpm/pool.d/ххх.хх.хх.conf
systemctl restart php7.2-fpm
1 Like

Thanks!
I think the cause of the problem is my attempts to change the php version in the HestiaCP web interface when trying to solve the issue with incorrect time zone handling by version 8.3

1 Like

Hi there,

I encountered the same issue today. After some investigation, I discovered that when changing the PHP version (UI or CLI) for a specific website (e.g., from 7.4 to 8.2), the PHP-FPM pool configuration updates partially:

✓ The socket path is correctly updated to the new version (8.2)
✗ However, the pool configuration file remains in the old directory: /etc/php/7.4/fpm/pool.d/

I can fix this using v-rebuild-web-domain, but then PHP 8.2 fails to start because the same socket path already exists in /run/php (created by PHP 7.4 when it had the incorrect path in its configuration).

Workaround:

  1. First, restart the original PHP version (7.4)
  2. Then restart the target PHP version

This ensures the socket file /run/php/=php8.2-fpm-example.com.sock, but created with PHP 7.4 is properly removed.

I believe this is a bug in the v-change-web-domain-backend-tpl script.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.