是什么原因导致“请求在等待太长时间以致无法为您的请求提供服务后被中止"? [英] What causes "Request was aborted after waiting too long to attempt to service your request"?

查看:244
本文介绍了是什么原因导致“请求在等待太长时间以致无法为您的请求提供服务后被中止"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么原因导致请求等待了太长时间而无法为您的请求提供服务后中止"?

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?

此外,如果Cloud Tasks中的任务失败并显示请求等待了很长时间,无法尝试为您的请求提供服务后中止了请求",该任务会重试还是从队列中删除?

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?

我发现了问题. 这是我们app.yaml中scailing的配置:

I found the problem. This was the configuration for scailing in our app.yaml:

basic_scaling:
  max_instances: 2

推荐答案

当我代理查看在f1-micro后端具有许多图形的munin节点时,我发现了这一点.如果响应等待的时间长于(min|max)_pending_latency,则将失败并显示529错误-可能正在尝试创建新实例,因为违反了最小值,但找不到.

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.

默认值似乎是5秒.您可以在app.yaml中将其设置为最多15秒.

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

一旦这样做,我就停止等待6s的请求的错误.当然,我确定Google会希望您增加扩展实例的数量,或者使用更快的节点.但是也许您只想扩展到一到两个,或者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.

我的完整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

这篇关于是什么原因导致“请求在等待太长时间以致无法为您的请求提供服务后被中止"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆