nixos/phpfpm: set systemd Type to notify-reload when possible#434262
nixos/phpfpm: set systemd Type to notify-reload when possible#434262aanderse wants to merge 2 commits into
Conversation
Working on a better implementation, but #435005 will take care of the error in the meantime. |
|
You might also be able to set (not a blocker) |
407cff2 to
f900b13
Compare
f900b13 to
866944f
Compare
Ma27
left a comment
There was a problem hiding this comment.
When I deploy this to a relatively normal Nextcloud installation, the reload runs into a timeout:
Sep 05 08:29:10 cloud php-fpm[1779427]: [NOTICE] Reloading in progress ...
Sep 05 08:29:10 cloud systemd[1]: Reloading PHP FastCGI Process Manager service for pool nextcloud...
Sep 05 08:29:10 cloud php-fpm[1779427]: [NOTICE] reloading: execvp("/nix/store/7c9pia7r4vvjb28lmndm46pkzqdc65wv-php-with-extensions-8.3.24/bin/php-fpm", {"/nix/store/7c9pia7r4vvjb28lmndm46pkzqdc65wv-php-with-extensions-8.3.24/bin/php-fpm", "-y", "/nix/store/c6lm1hzg6v4ygiinvw6s3inprp6ksxx1-phpfpm-nextcloud.conf", "-c", "/nix/store/xpq174hpbllkiw7hgryi43k91433ssxg-php.ini"})
Sep 05 08:29:10 cloud php-fpm[1779427]: [NOTICE] using inherited socket fd=7, "/run/phpfpm/nextcloud.sock"
Sep 05 08:29:10 cloud php-fpm[1779427]: [NOTICE] using inherited socket fd=7, "/run/phpfpm/nextcloud.sock"
Sep 05 08:29:10 cloud php-fpm[1779427]: [NOTICE] fpm is running, pid 1779427
Sep 05 08:29:11 cloud php-fpm[1779427]: [NOTICE] ready to handle connections
Sep 05 08:29:11 cloud php-fpm[1779427]: [NOTICE] systemd monitor interval set to 10000ms
[...]
Sep 05 08:29:56 cloud systemd[1]: phpfpm-nextcloud.service: Reload operation timed out. Killing reload process.
Sep 05 08:29:56 cloud systemd[1]: Reload failed for PHP FastCGI Process Manager service for pool nextcloud.
The reload signal was correctly handled given the logs, but apparently the sd_notify isn't happening?
Did you have some special configuration that made it work for you and we're probably missing in nixpkgs?
This is btw not a Nextcloud-specific thing, I can reproduce this with other phpfpm installations as well.
Blocking for now to prevent accidental merges until this is resolved.
Things done
as promised in #430490 (comment) adding
notify-reloadsupportfrom
php-fpmdocumentation:i browsed through the
php-fpmsource and basically if this option isn't0thenphp-fpmwill writeREADY=1\nto thesystemdsocket everynseconds as defined in config... which means incidentallynotify-reloadwill workbtw... @roberth any idea what is going on here? did something change or was this error missed somehow in the last PR? when i run
nix-build -A nixosTests.php.fpm-modulari get this error:passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.