|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesfix-inherited-socket-duplication-on-reload.patch (last revision 2020-08-27 04:32 UTC by syazov at plesk dot com)Pull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2020-08-27 04:32 UTC] syazov at plesk dot com
[2020-12-28 21:42 UTC] bukka@php.net
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: bukka
[2020-12-28 21:42 UTC] bukka@php.net
[2020-12-29 03:08 UTC] syazov at plesk dot com
[2020-12-29 03:10 UTC] syazov at plesk dot com
[2021-01-30 20:55 UTC] bukka@php.net
[2021-02-18 11:23 UTC] syazov at plesk dot com
[2021-02-28 21:16 UTC] bukka@php.net
[2021-02-28 21:17 UTC] bukka@php.net
[2021-03-21 18:52 UTC] bukka@php.net
[2021-03-21 18:52 UTC] bukka@php.net
-Status: Assigned
+Status: Closed
[2021-03-21 19:00 UTC] bukka@php.net
[2021-03-21 19:01 UTC] bukka@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 03:00:02 2025 UTC |
Description: ------------ "FPM_SOCKETS_X" env variable isn't cleaned when it's become unused. The issue is appeared if count of sockets is changed from "FPM_ENV_SOCKET_SET_SIZE * n + 1" to "FPM_ENV_SOCKET_SET_SIZE * n" In such cases the same socket presents in "FPM_SOCKETS_[socket_set_count - 1]" and "FPM_SOCKETS_[socket_set_count]" Test script: --------------- #!/bin/bash -xe # all paths are specific to default ones in Ubuntu 20.04 pool_d="/etc/php/7.4/fpm/pool.d" pool_0="$pool_d/www.conf" sed -i "s/^pm = dynamic$/pm = ondemand/" "$pool_0" for i in {1001..1128}; do pool_i="$pool_d/www_$i.conf" cp -p "$pool_0" "$pool_i" sed -i "s/^\[www\]$/\[www_$i\]/" "$pool_i" sed -i "s|^listen = /run/php/php7.4-fpm.sock$|listen = /run/php/php7.4-fpm.$i.sock|" "$pool_i" done systemctl restart php7.4-fpm rm -f "$pool_d/www_1001.conf" systemctl reload php7.4-fpm systemctl reload php7.4-fpm Expected result: ---------------- php-fpm reloads successfully. Actual result: -------------- "503 Service Unavailable" is shown ``` ls: cannot access '/run/php/php7.4-fpm.1128.sock': No such file or directory ``` ``` [27-Aug-2020 10:31:00] NOTICE: reloading: execvp("/usr/sbin/php-fpm7.4", {"/usr/sbin/php-fpm7.4", "--nodaemonize", "--fpm-config", "/etc/php/7.4/fpm/php-fpm.conf"}) [27-Aug-2020 10:31:02] NOTICE: using inherited socket fd=7, "/run/php/php7.4-fpm.sock" [27-Aug-2020 10:31:02] NOTICE: using inherited socket fd=135, "/run/php/php7.4-fpm.1128.sock" [27-Aug-2020 10:31:02] NOTICE: using inherited socket fd=9, "/run/php/php7.4-fpm.1002.sock" ... [27-Aug-2020 10:31:02] NOTICE: using inherited socket fd=134, "/run/php/php7.4-fpm.1127.sock" [27-Aug-2020 10:31:02] NOTICE: using inherited socket fd=135, "/run/php/php7.4-fpm.1128.sock" [27-Aug-2020 10:31:02] ERROR: epoll: unable to add fd 135 ```