On Heroku support ticket 532736, I noticed that the bin/start-pgbouncer-stunnel script exits with status zero even if its child process exited with an error status and the platform detected that the process "complete" even if the app failed to start the command. It would be the best if the process exits with the status code received with the wait command.