php-fpm on macports: An another FPM instance seems to already listen

I’ve had this issue with php-fpm from Macports which would fill up my log files rapidly and cause other mischief. The error message in question is:

ERROR: An another FPM instance seems to already listen on /opt/local/var/run/php56/php56-fpm.sock

I finally managed to fix it by simply forcing php-fpm to not run as a daemon by adding the --nodaemonize switch to /Library/LaunchDaemons/org.macports.php56-fpm.plist.

Most likely this means that daemondo keeps on spawning php-fpm instances although one already exists for some reason.

I think the default behavior for php-fpm is to listen on a TCP socket which might explain the issue, as I have changed it to listen on a Unix-socket instead.