Traffic routed to instances not passing health check

Cool. I’ve added a shell script using fcgi-probe to make sure php-fpm is accepting requests before starting nginx. The script is pasted below just in case if anyone need it for the time being:

#!/bin/sh

# adjust the path to match your app
until fcgi-probe -s tcp://127.0.0.1:9000/_fpm/ping
do
    echo "Waiting for php-fpm..."
    sleep 1
done

echo "php-fpm started, starting nginx..."
exec nginx

Please do consider fixing the proxy’s intended behavior for health checks so the script won’t be needed in the future though. Thanks!