Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenShift Service Proxy timeout

I have an application deployed on OpenShift Container Platform v3.6. It consists of multiple services interconnected to each other.

The frontend service calls a time consuming function of the backend service (through a REST call), but after 30 seconds it receives a "504 Gateway Timeout" message. Frontend runs over nginx, but I've already configured it with long proxy send/read timeouts, so the 504 message doesn't come from it. I think it comes from the Service Proxy component of OpenShift Platform, but I can't find out where and how configure a kind of service proxy timeout. I know the existence of HAProxy timeout for external routes, but my services leave in the same cluster application and communicate each other via OpenShift Container Platform DNS.

Could be a Service Proxy timeout issue? How can it be configured?

Thanks!

like image 816
Maverik Avatar asked Dec 14 '17 11:12

Maverik


People also ask

How do I fix 504 Gateway Timeout error in OpenShift?

Resolution: Override the default OpenShift cluster HA-proxy session timeout for your application by adding a setting to the route for the apps.

What is HAProxy in OpenShift?

HAProxy is an open source, software-defined load balancer and proxy application. In OpenShift, it takes the URL route associated with an application and proxies those requests into the proper pod to get the requested data back to the requesting user.

What is ingress controller in OpenShift?

The Ingress Operator makes it possible for external clients to access your service by deploying and managing one or more HAProxy-based Ingress Controllers to handle routing. You can use the Ingress Operator to route traffic by specifying OpenShift Container Platform Route and Kubernetes Ingress resources.


1 Answers

Your route timeout is the culprit. The haproxy ingress router is terminating the request. You can configure the timeout by following the docs below:

https://docs.openshift.com/container-platform/3.5/install_config/configuring_routing.html

For example:

# Set the timeout on 'longrunningroute' to five minutes.
oc annotate route longrunningroute --overwrite haproxy.router.openshift.io/timeout=5m
like image 77
Dave Kerr Avatar answered Sep 28 '22 13:09

Dave Kerr