googleapis / googleapis/google-cloud-php

Occasional errors under heavy load, fetching the projectId from the metadata server.

Open
#454 0 comments 0 reactions 0 assignees View on GitHub
type: feature request
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.