Per default configuration, php-fpm will bind to "127.0.0.1", but the php-fpm runscript from dev-lang/php-5.5.13 has set "need net". This is wrong: net.lo doesn't set up the loopback device. You should depend on the "loopback" service instead. Also the current setting (need net) is causing php-fpm to restart every time an interface is restarting. So it seems like the php-fpm runscript is misusing "need net". See https://blog.flameeyes.eu/2012/10/may-i-have-a-network-connection-please for more information. Reproducible: Always
You are correct. If no one else comments for a while, I'll remove that line from the init script.
I think it could be changed to "use net" for ordering sake and/or possibly add a commented conf.d/php-fpm if you need a specific interface.
(In reply to Brian Evans from comment #2) > I think it could be changed to "use net" for ordering sake and/or possibly > add a commented conf.d/php-fpm if you need a specific interface. A "use net" will still attempt to bring up unrelated interfaces. The php-fpm configuration that we ship has "listen = 127.0.0.1:9000", so we probably don't want to bring up e.g. eth4 to start php-fpm on 127.0.0.1. But yeah, if the user changes that "listen" line, then he'll need to create /etc/conf.d/php-fpm. I guess the best place to mention that is in the conf file right next to the "listen" line? Something like, ; If you change this to listen on another interface, then you'll need to ; inform your init system to wait for that interface to come up before ; starting php-fpm. With OpenRC, this can be accomplished by adding the ; line (for example), ; ; rc_need="net.eth0" ; ; to the file /etc/conf.d/php-fpm. If that files does not exist, you may ; create it. The service name "net.eth0" should be replaced by the interface ; associated with the address in your "listen" directive above.
Well, the "need net" thing is fixed: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79b8064e2ee191fc3d63e716e6ab4245332fe5c9 I'm planning on getting rid of that php-fpm.conf file that we're keeping in $FILESDIR, so I'm not sure how we should document this. Maybe we can put an example in a conf.d file, commented out, showing how to do it. That could be done at the same time as bug #549172 which would also need a conf.d file.