Appengine deployments are extraodinarily slow today?
Asked Answered
L

2

2

We have a small java project need to deploy it include 9000+ files

command : mvn gcloud:deploy

but I get the Log:

    ...
[INFO] INFO: Uploading [/home/steven/work/idigisign/target/appengine-staging/__static__/node_modules/rx/src/core/linq/observable/when.js] to [7dfb30ad32893c5042dba03601f006a40419fab0]
    [INFO] DEBUG: Uploading [/home/steven/work/idigisign/target/appengine-staging/assets/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js] to [7e0725897d7b99c3c33b56915d202e2dde552ea9]
    [INFO] INFO: Uploading [/home/steven/work/idigisign/target/appengine-staging/assets/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js] to [7e0725897d7b99c3c33b56915d202e2dde552ea9]
    [INFO] DEBUG: Uploading [/home/steven/work/idigisign/target/appengine-staging/node_modules/is-redirect/index.js] to [7e0afe4775bf7f8558665760171c01948c22f771]
    [INFO] INFO: Uploading [/home/steven/work/idigisign/target/appengine-staging/node_modules/is-redirect/index.js] to [7e0afe4775bf7f8558665760171c01948c22f771]
    [INFO] DEBUG: Uploading [/home/steven/work/idigisign/target/appengine-staging/node_modules/rxjs/src/util/Map.ts] to [7e11722f4cd9ce91ec99b97710fbc4e7f40be09d]
...

About 50 per minute So it will spent 180 minute...

It is extraodinarily slow

anybody can help me?

Linea answered 6/6, 2016 at 13:53 Comment(3)
Help you... speed up Appengine? I doubt it, frankly.Same
I do not know why deployment is slow, it used to be soon. Maybe there is error config in my project?Linea
Well maybe, but who could tell from you've written?Same
B
4

Set the environment variable CLOUDSDK_APP_USE_GSUTIL=1 and try again; this uses a less-reliable but faster codepath for file upload (there are plans to speed up the default codepath).

Biostatics answered 6/6, 2016 at 14:27 Comment(0)
M
3

We have the same issue, it's very slow. Guess we have solved it.

First, we traced the gcloud logs and we found many files had been uploaded again, these files all are no modified. So we try to trace the source code of gcloud and we found the issue is caused by "Google Cloud Storage JSON API".

When it queried the List of Bucket, it returned 1000 items but we have 1325 items so I guess we find the issue.

Then, we look for the api reference, and we find a parameter - maxResults, so we try to modify the source code(cloud_storage.py), and we find it has No Effect when its value is over 1000.

Finally, we find another parameter - nextPageToken, and we query list until the "nextPageToken" is None, now it got all items from "Google Cloud Storage" and the exists files not be uploaded again.

def ListBucket(bucket_ref, client):
  request = STORAGE_MESSAGES.StorageObjectsListRequest(bucket=bucket_ref.bucket)

  items = set()
  try:
    response = client.objects.List(request)
    for item in response.items:
      items.add(item.name)
    while response.nextPageToken:
      request = STORAGE_MESSAGES.StorageObjectsListRequest(bucket=bucket_ref.bucket,pageToken=response.nextPageToken)
      response = client.objects.List(request)
      for item in response.items:
        items.add(item.name)
  except api_exceptions.HttpError as e:
    raise UploadError('Error uploading files: {e}'.format(e=e))

  return items
Mcelhaney answered 14/6, 2016 at 8:26 Comment(1)
This issue is fixed in the (to be released) Cloud SDK 115.0.0.Biostatics

© 2022 - 2024 — McMap. All rights reserved.