问题
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 where this is configured. We're currently using autoscaling, and that error was the result of a temporary increase in the number of tasks in our taskqueue. Shouldn't autoscaling have created more instances to handle that request?
Also, if a task in Cloud Tasks fails with "Request was aborted after waiting too long to attempt to service your request", is that task retried, or is it removed from the queue?
Edit: I found the problem. This was the configuration for scailing in our app.yaml:
basic_scaling:
max_instances: 2
回答1:
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
来源:https://stackoverflow.com/questions/60067155/what-causes-request-was-aborted-after-waiting-too-long-to-attempt-to-service-yo