0

I am using a requestor connector in mule 4 for calling an API. That API takes 24 minutes to send back the response to requestor. So when I am running my application in cloudhub, I am getting HTTP:GATEWAY_TIMED_OUT, error_code: 504.

The response timeout I am setting in the requestor is 24 minutes and connection idle timeout is set to default(30000ms)

How can we update the response timeout of cloudhub?

Mayur Tripathi
  • 69
  • 2
  • 12

1 Answers1

1

I understand that you are making an HTTP request to a REST API implemented as an application deployed in CloudHub. You probably are using an URL that goes through CloudHub load balancer (example https://myapp.us-e1.cloudhub.io/api/...). The load balancer has a fixed 5 minutes that can not be changed. Note that 24 minutes is a lot of time to keep connections resources open.

Some alternatives could:

  • Restructure your application to operate in an asynchronous manner. This might require significant effort.
  • Skip the load balancer tier and connect to the application worker directly using its DNS name (example https://mule-worker-myapp.us-e1.cloudhub.io:8082/api/...). Be aware that going this way you will lose the benefits of using a load balancer.
aled
  • 21,330
  • 3
  • 27
  • 34
  • thanks for the response, really appreciate it. I cannot skip LB as it is the client requirement. Also the API which i am calling is batch processing internally. – Mayur Tripathi Mar 24 '21 at 06:09
  • Unfortunately that might mean that the application is not well suited to run in a cloud environment. – aled Mar 24 '21 at 12:59