Document how to debug connection issues
I've spent enormous amount of time trying to debug my connection issue. The main reason was lack of proper documentation on php.net which I'm trying to resolve here.
There is a TODO in the proposed change - the reason for it is that I'm not sure where that magical value 7 is coming from and what level it relates to. I've scanned the php-src code base, but found nothing useful. That TODO comment represents my findings.
@mcmic could you review this when you have time?
Debug output goes to the STDOUT/STDERR. Not sure which as I was testing in the container environment- when script was called from CLI, the output was visible straight away, when called via output was on on php-fpm container log.