Google app engine 谷歌应用程序引擎&x2B;云端点+;Google Translate API=502坏网关

Google app engine 谷歌应用程序引擎&x2B;云端点+;Google Translate API=502坏网关,google-app-engine,google-cloud-endpoints,google-translate,Google App Engine,Google Cloud Endpoints,Google Translate,我使用云端点创建了一个简单的API,它使用GoogleTranslateAPI进行一些翻译,将它们缓存在数据存储中,并将结果列表返回给客户端。 问题是,每次使用Google Translate API进行调用时,我都会收到502个坏网关错误。 我已经从云控制台调试了我的端点,并且成功创建了响应,所以在将结果发送回客户端时必须抛出502。另一件奇怪的事情是,我在云控制台的任何日志工具上都没有看到502 我曾试图将该地区从欧洲西部改为美国中部,但迄今为止运气不佳。 有人有什么想法吗?这里可能出了什么

我使用云端点创建了一个简单的API,它使用GoogleTranslateAPI进行一些翻译,将它们缓存在数据存储中,并将结果列表返回给客户端。 问题是,每次使用Google Translate API进行调用时,我都会收到502个坏网关错误。 我已经从云控制台调试了我的端点,并且成功创建了响应,所以在将结果发送回客户端时必须抛出502。另一件奇怪的事情是,我在云控制台的任何日志工具上都没有看到502

我曾试图将该地区从欧洲西部改为美国中部,但迄今为止运气不佳。 有人有什么想法吗?这里可能出了什么问题

我对GAE的支持:

runtime: java7
env: standard
threadsafe: true
instance_class: B2
inbound_services:
  - warmup
handlers:
  - url: '(/.*/)'
    application_readable: false
    static_files: "__static__\\1index.html"
    require_matching_file: true
    upload: __NOT_USED__
  - url: (/)
    application_readable: false
    static_files: "__static__\\1index.html"
    require_matching_file: true
    upload: __NOT_USED__
  - url: '(/.*)'
    application_readable: false
    static_files: "__static__\\1"
    require_matching_file: true
    upload: __NOT_USED__
  - url: /
    script: unused
  - url: '/.*/'
    script: unused
  - url: '/_ah/.*'
    script: unused
basic_scaling:
  idle_timeout: 900s
  max_instances: 2
更改GAE的配置并删除基本缩放时,我从Google translate获得以下错误:

com.google.cloud.translate.TranslateException: com.google.apphosting.api.ApiProxy$CancelledException: The API call urlfetch.Fetch() was cancelled because the overall HTTP request deadline was reached.
at io.stringx.repository.DatastoreTranslationRepository.translate (DatastoreTranslationRepository.java:53)

事实证明,谷歌云端点有60秒的截止日期限制,所以我不得不分块提出请求:

事实证明,谷歌云端点有60秒的截止日期限制,所以我不得不分块提出请求: