google-cloud-php
google-cloud-php copied to clipboard
Occasional errors under heavy load, fetching the projectId from the metadata server.
On App Engine flex, under certain load, I occasionally observe the following exception. Of course, you can easily workaround by providing a projectId, but does it make sense to cache the fetched value?
Google\Cloud\Core\Exception\GoogleException: No project ID was provided, and we were unable to detect a default project ID.
at Google\Cloud\Logging\LoggingClient->configureAuthentication (/app/vendor/google/cloud-core/ClientTrait.php:170)
at Google\Cloud\Logging\LoggingClient->__construct (/app/vendor/google/cloud-logging/LoggingClient.php:124)
at Google\Cloud\Logging\BatchLogger->getLogger (/app/vendor/google/cloud-logging/BatchLogger.php:88)
at Google\Cloud\Logging\BatchLogger->log (/app/vendor/google/cloud-logging/BatchLogger.php:351)
at Google\Cloud\Logging\BatchLogger->info (/app/vendor/google/cloud-logging/BatchLogger.php:271)
at {main} (/app/web/index.php:13)