googleapis / googleapis/google-cloud-php
Occasional errors under heavy load, fetching the projectId from the metadata server.
- Dominant language
- PHP
- Stars
- 1.2k
- Forks
- 463
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 145
Description
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)
```
Contributor guide
Assessment
This issue has not been assessed yet.