We have been getting these exceptions from Google this evening:
Google\Cloud\Core\Exception\ServiceException: cURL error 56: OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104 (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
Google\Cloud\Core\Exception\ServiceException(code: 0): cURL error 7: Failed to connect to oauth2.googleapis.com port 443: Connection timed out (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
Google\Cloud\Core\Exception\ServiceException(code: 0): cURL error 28: Operation timed out after 2001 milliseconds with 0 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
We can handle the exceptions fine, but there is a significant timeout between the connection initiation and the exception occurring. This means our server hangs for a long period of time as a request is initiated to Google, waits for connection to be properly created, fails, and then continues. This means our requests take a ridiculous amount of time (~20 seconds - 3 minutes approximately) instead of milliseconds.
So:
- How can we determine what the root cause of this problem is? I'm assuming it's a Google related service issue, but their Google Console is clear
- How can we set a timeout to be significantly shorter so that it doesn't cause long delays, particularly of importance with user facing requests.
We're using the PHP PubSubClient, specifically only the publish method at the moment.