OpenShift服务代理超时

Mav*_*rik 5 rest proxy timeout haproxy openshift

我在OpenShift Container Platform v3.6上部署了一个应用程序.它由多个彼此互连的服务组成.

前端服务调用消耗的功能的时间后端服务(通过一个REST呼叫),但后30秒它接收到一个"504网关超时"消息.前端运行在nginx上,但我已经使用长代理发送/读取超时配置它,因此504消息不是来自它.我认为它来自OpenShift Platform 的Service Proxy组件,但我无法找到配置一种服务代理超时的位置和方式.我知道外部路由存在HAProxy超时,但我的服务留在同一个集群应用程序中,并通过OpenShift Container Platform DNS相互通信.

可能是服务代理超时问题?怎么配置?

谢谢!

Dav*_*err 10

你的路线超时是罪魁祸首.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
Run Code Online (Sandbox Code Playgroud)