php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #54172 Overriding the pid file location of php-fpm
Submitted: 2011-03-06 10:18 UTC Modified: 2011-07-02 19:39 UTC
From: olemarkus at gentoo dot org Assigned: fat (profile)
Status: Closed Package: FPM related
PHP Version: 5.3.5 OS:
Private report: No CVE-ID: None
 [2011-03-06 10:18 UTC] olemarkus at gentoo dot org
Description:
------------
After Gentoo added FPM support, one of the most-reported issues we have related to FPM is to make sure the PID file location in the FPM configuration and the one in the init script match each other. Currently we set a fixed pid location in the config file and the init script expects that this config is not changed. If a user change the pid file location, the init script stops working. The only alternative solution I have seen so far is to use to try to grep the pid location from the config, but at least the attempt done by the dotdeb maintainer to do this did not work very well.

It would be nice if an argument could be added to the php-fpm binary allowing init-scripts to specify the pid file location directly, overriding any location configured in the FPM configuration file. 


Patches

fpm-pid.v1.patch (last revision 2011-07-02 17:39 UTC by fat@php.net)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-02 13:38 UTC] fat@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: fat
 [2011-07-02 13:39 UTC] fat@php.net
The following patch has been added/updated:

Patch Name: fpm-pid.v1.patch
Revision:   1309628366
URL:        https://bugs.php.net/patch-display.php?bug=54172&patch=fpm-pid.v1.patch&revision=1309628366
 [2011-07-02 13:42 UTC] fat@php.net
-Status: Assigned +Status: Feedback
 [2011-07-02 13:42 UTC] fat@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


Can you please test the attached patch and tell me if it seems to be OK with 
you.

I've added a -g (or --pid) to php-fpm binary to specify the pid file. 

Note: if the pid is also defined in php-fpm.conf, an error is thrown because the 
pid is defined twice. So you should remove the pid line in the php-fpm.conf 
you're providing and add a comment NOT to use it in order not to interfere with 
your init.d script.

++ jerome
 [2011-07-02 15:16 UTC] olemarkus at gentoo dot org
-Status: Feedback +Status: Assigned
 [2011-07-02 15:16 UTC] olemarkus at gentoo dot org
It looks good to me. I've applied the patch to the 5.3.7 RC2 source and modified the Gentoo fpm conf and init scripts; it seems to be working as I want it to.

Thanks!
 [2011-07-02 19:39 UTC] fat@php.net
-Status: Assigned +Status: Closed
 [2011-07-02 19:39 UTC] fat@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2011-07-02 19:41 UTC] fat@php.net
Automatic comment from SVN on behalf of fat
Revision: http://svn.php.net/viewvc/?view=revision&revision=312827
Log: - Implemented FR #54172 (Overriding the pid file location of php-fpm)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 09:01:32 2024 UTC