调用多个 Google Cloud 运行 请求是否调用容器的新实例
Does calling multiple Google Cloud Run requests invoke new instances of the container
我目前在 Google 云 运行 服务中有一个容器。当使用 HTTP GET 请求并行多次调用它时,我检查了日志并且由于超出当前设置为 2GB 的内存使用而超时。
我认为容器服务每次都会调用一个新容器,因此发出的请求量应该无关紧要?如果只调用一次或两次,此服务就可以工作。
如果你想让它在每个并行请求中启动一个新容器,你需要将并发设置为 1(或者在没有 OOM 的情况下尽可能高)。默认为 80。
--concurrency=CONCURRENCY
Set the number of concurrent requests allowed per container instance. A
concurrency of 0 or unspecified indicates any number of concurrent
requests are allowed. To unset this field, provide the special value
default.
我目前在 Google 云 运行 服务中有一个容器。当使用 HTTP GET 请求并行多次调用它时,我检查了日志并且由于超出当前设置为 2GB 的内存使用而超时。
我认为容器服务每次都会调用一个新容器,因此发出的请求量应该无关紧要?如果只调用一次或两次,此服务就可以工作。
如果你想让它在每个并行请求中启动一个新容器,你需要将并发设置为 1(或者在没有 OOM 的情况下尽可能高)。默认为 80。
--concurrency=CONCURRENCY
Set the number of concurrent requests allowed per container instance. A
concurrency of 0 or unspecified indicates any number of concurrent
requests are allowed. To unset this field, provide the special value
default.