4.10. 配置修订超时
您可以在全局范围内或单独为修订版本配置超时持续时间,以控制请求上的时间。
4.10.1. 配置修订超时 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
您可以根据请求配置修订超时的默认秒数。
先决条件
- 安装了 OpenShift Serverless Operator 和 Knative Serving。
- 在 OpenShift Container Platform 上,或具有 Red Hat OpenShift Service on AWS 或 OpenShift Dedicated 的集群管理员权限。
流程
选择配置修订超时的适当方法:
要在全局范围内配置修订超时,请在
KnativeServing
自定义资源(CR)中设置revision-timeout-seconds
字段:Copy to Clipboard Copied! Toggle word wrap Toggle overflow 通过在服务定义中设置
timeoutSeconds
字段来配置每个修订版本的超时:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.10.2. 配置最大修订超时 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
通过设置最大修订超时,您可以确保任何修订版本不会超过特定限制。
先决条件
- 安装了 OpenShift Serverless Operator 和 Knative Serving。
- 在 OpenShift Container Platform 上,或具有 Red Hat OpenShift Service on AWS 或 OpenShift Dedicated 的集群管理员权限。
流程
要配置最大修订超时,请在
KnativeServing
自定义资源(CR)中设置max-revision-timeout-seconds
字段:If this value is increased, the activator `terminationGracePeriodSeconds` should also be increased to prevent in-flight requests being disrupted.
If this value is increased, the activator `terminationGracePeriodSeconds` should also be increased to prevent in-flight requests being disrupted.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow