Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 343649

Summary: dev-lang/php-5.3.3-r3: php-fpm init script must check if fpm daemon started
Product: Gentoo Linux Reporter: Sergey Ilinykh <rion4ik>
Component: [OLD] DevelopmentAssignee: PHP Bugs <php-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: gef.kornflakes
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 348628    

Description Sergey Ilinykh 2010-11-01 09:12:28 UTC
if php-fpm starts but fails to bind tcp port (for example because its already in use by some other daemon), init script reports success but actually daemon terminates.
probably there some other cases which may lead to the same situation.
I'd suggest to add --wait param to start-stop-deamon line, but its baselayout-2 dependent, so decice yourself

Reproducible: Always

Steps to Reproduce:
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2010-11-05 20:51:15 UTC
php-fpm? Which package is that? Is it on portage?
Comment 2 Sergey Ilinykh 2010-11-05 20:54:24 UTC
sorry, i fixed description
Comment 3 Ole Markus With (RETIRED) gentoo-dev 2010-12-08 21:31:43 UTC
I think maybe configuring fpm to create a pid file by default and using that as a way to see if fpm started may be a better way.
Comment 4 Matti Bickel (RETIRED) gentoo-dev 2010-12-19 22:48:10 UTC
We now create the pidfile in /var/run/php-fpm.pid and check for it with a timeout of 5 secs. Thanks Ole for the init.d file, I just uncommented the pidfile config.