FS#20340 - PHP-FPM rc-script can't determine the daemom start

Attached to Project: Arch Linux
Opened by Arseny Vakhrushev (waxar) - Monday, 02 August 2010, 09:09 GMT
Last edited by Pierre Schmitz (Pierre) - Monday, 02 August 2010, 16:39 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

When issuing a command to start the php-fpm daemon, the rc-script hangs for a period of time trying to determine whether a pid-file is created.

Additional info:

php-fpm 5.3.3-1
Upgraded from the extra repository. Before the upgrade, the package was built from the AUR repository.
It's suggested to get rid of a separate /var/run/php-fpm/ directory for a pid-file in the rc-script. The former rc-script file is in the attachment. It works totally fine.

Steps to reproduce:

pacman -Sy php-fpm
/etc/rc.d/php-fpm start
   php-fpm (1.2 KiB)
This task depends upon

Closed by  Pierre Schmitz (Pierre)
Monday, 02 August 2010, 16:39 GMT
Reason for closing:  Not a bug
Comment by Pierre Schmitz (Pierre) - Monday, 02 August 2010, 09:31 GMT
This "waiting" is needed because php-fpm exits immediately. So there is a chance that the check for the pid file might fail even though everything is fine. This is also just the init script provided by upstream with some modifications to suite Arch.

I also don't see the point of not having a separate php-fpm dir in /var/run. This is quite common especially if you have more than one file (a lock file and a pid file) to store. Using your script would definitely break things.

There is also no way we can support an update from packages you have build on your own.
Comment by Arseny Vakhrushev (waxar) - Monday, 02 August 2010, 09:45 GMT
The real problem is that the provided rc-script is waiting for pid-file /var/run/php-fpm/php-fpm.pid to be created, but the daemon creates the file as /var/run/php-fpm.pid. That is why the waiting takes that long and the final [FAIL] message is issued.

I don't mind having a separate directory for pids and locks. It just needs to be appropriately configured then. The provided rc-script doesn't work as expected.

If the modifications made don't intersect with the pid file path, I certainly need to bug report to the upstream.
Comment by Pierre Schmitz (Pierre) - Monday, 02 August 2010, 10:17 GMT
I see your problem now. You probably didn't update your /etc/php/php-fpm.conf when switch from your own package to the one from extra. Make sure it has "pid = /var/run/php-fpm/php-fpm.pid" defined in the "[global]" section.
Comment by Arseny Vakhrushev (waxar) - Monday, 02 August 2010, 14:02 GMT
Ok, thank you, Pierre!

Loading...