What causes “Request was aborted after waiting too long to attempt to service your request”?

前端 未结 1 1086
栀梦
栀梦 2021-01-28 02:20

What causes \"Request was aborted after waiting too long to attempt to service your request\"?

It seems the result of some sort of internal timeout, but I don\'t know wh

相关标签:
1条回答
  • 2021-01-28 03:14

    I found this when I was proxying to view a munin node with many graphs on an f1-micro backend. Responses will fail with a 529 error if they are waiting for longer than (min|max)_pending_latency - probably it is trying to create a new instance, because the minimum is violated, but finds it cannot.

    The default appears to be 5s. You can set it in app.yaml to a max of 15s.

    automatic_scaling:
      min_pending_latency: 15s
      max_pending_latency: 15s
    

    Once I did that I stopped getting the errors for requests waiting for 6s. Of course, I'm sure Google would prefer you increase the number of scaling instances, or use a faster node. But maybe you only want to scale to one or two, or 15s is an acceptable latency for what you're trying to do.

    For reference, my full app.yaml:

    runtime: php73
    service: munin
    instance_class: F1
    
    automatic_scaling:
      max_instances: 1
      min_instances: 0
      target_cpu_utilization: 0.95
      target_throughput_utilization: 0.95
      max_concurrent_requests: 80
      max_pending_latency: 15s
    
    handlers:
    - url: .*
      script: auto
      secure: always
    
    0 讨论(0)
提交回复
热议问题