OpenShift 服务代理超时
OpenShift Service Proxy timeout
我在 OpenShift Container Platform v3.6 上部署了一个应用程序。它由相互关联的多个服务组成。
前端服务调用了后端[=35=的一个耗时函数] 服务(通过 REST 调用),但在 30 秒 后它收到一条 “504 网关超时” 消息。 Frontend跑过nginx,但我已经配置了长代理send/read超时,所以 504 消息不是来自它。我认为它来自 OpenShift Platform 的 Service Proxy 组件,但我找不到在哪里以及如何配置一种 服务代理超时。我知道存在 HAProxy 外部路由超时,但我的服务留在同一个集群应用程序中并通过 OpenShift Container Platform DNS 相互通信。
可能是服务代理超时问题?如何配置?
谢谢!
你的路由超时是罪魁祸首。 haproxy 入口路由器正在终止请求。您可以按照以下文档配置超时:
https://docs.openshift.com/container-platform/3.5/install_config/configuring_routing.html
例如:
# Set the timeout on 'longrunningroute' to five minutes.
oc annotate route longrunningroute --overwrite haproxy.router.openshift.io/timeout=5m
我在 OpenShift Container Platform v3.6 上部署了一个应用程序。它由相互关联的多个服务组成。
前端服务调用了后端[=35=的一个耗时函数] 服务(通过 REST 调用),但在 30 秒 后它收到一条 “504 网关超时” 消息。 Frontend跑过nginx,但我已经配置了长代理send/read超时,所以 504 消息不是来自它。我认为它来自 OpenShift Platform 的 Service Proxy 组件,但我找不到在哪里以及如何配置一种 服务代理超时。我知道存在 HAProxy 外部路由超时,但我的服务留在同一个集群应用程序中并通过 OpenShift Container Platform DNS 相互通信。
可能是服务代理超时问题?如何配置?
谢谢!
你的路由超时是罪魁祸首。 haproxy 入口路由器正在终止请求。您可以按照以下文档配置超时:
https://docs.openshift.com/container-platform/3.5/install_config/configuring_routing.html
例如:
# Set the timeout on 'longrunningroute' to five minutes.
oc annotate route longrunningroute --overwrite haproxy.router.openshift.io/timeout=5m