Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): add more info on timeout to README #2532

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@ Once composer is installed, execute the following command in your project root t
composer require google/apiclient:^2.15.0
```

If you're facing a timeout error then either increase the timeout for composer by adding the env flag as `COMPOSER_PROCESS_TIMEOUT=600 composer install` or you can put this in the `config` section of the composer schema:
```
{
"config": {
"process-timeout": 600
}
}
```

Finally, be sure to include the autoloader:

```php
Expand Down Expand Up @@ -117,6 +108,29 @@ them explicitly:
}
```

**IMPORTANT** If you see the following error, it's because you need to increase your composer process timeout:

```
Script Google\Task\Composer::cleanup handling the pre-autoload-dump event terminated with an exception

In Filesystem.php line 200:

Failed to remove directory "(/path/to/vendor/google/apiclient-services/src/...": rmdir(/path/to/...): Text file busy
```

Either increase the timeout for composer by adding the env flag as `COMPOSER_PROCESS_TIMEOUT=600 composer install`,
or put this in the `config` section of the composer schema:
```json
{
"config": {
"process-timeout": 600
}
}
```

This happens because there are a LOT of Google services which are downloaded as part of this package, and it can
unfortunately take so long that composer's default of 300 seconds times out.

### Download the Release

If you prefer not to use composer, you can download the package in its entirety. The [Releases](https://github.com/googleapis/google-api-php-client/releases) page lists all stable versions. Download any file
Expand Down
Loading