Increase client timeout to 120 seconds

Hello.
I would like to know how to change the configs to increase timeout from 30 seconds to 120.

Hi @vmc , could you please be more explicit about what timeout you refer to?

sure…

when I make a request to an endpoint, it has a maximum execution time of 30 seconds. If takes more I get 5xx error. I need to increase it to 120 seconds so I can handle heavy tasks

I’m sorry but I don’t get what you want to solve - is it related to Qovery or to your application? Could you please provide more details about the error you are seeing and how you troubleshoot it?

well…
I dont know how to explain better, I will do my best

By default, if I am not wrong, AWS setups gateway api, EKS, etc etc with a maximum response time (execution time) of 30 seconds per http request.

After that I get a nginx error.

Its not my application because if I call the same endpoint with the necessary payload, it takes 102 seconds to run, but it gets done, so my application is ok.

I just want to know how to change it somewhere on qovery dash panel when setting cluster or k8 or something similar. I am not devops expert…
I asked chatgpt:

To increase the timeout for an API hosted on Amazon EKS with ELB and EC2 in AWS from 30 seconds to 120 seconds, you need to adjust several configurations in both ELB and EKS.

Here’s a detailed explanation in English:

  1. ELB (Elastic Load Balancer):

    • Access the AWS Management Console and navigate to the “Elastic Load Balancing” service.
    • Select the load balancer (ELB) associated with your application.
    • In the navigation pane, choose “Listeners”.
    • Find the listener corresponding to your API and click “Edit”.
    • Increase the value of “Idle timeout” to 120 seconds.
    • Save your changes.
  2. Target Group:

    • If you’re using target groups with your ELB, you may need to adjust the target group’s timeout settings as well.
    • Go to the “Target Groups” section in the AWS Management Console.
    • Select the target group associated with your EC2 instances.
    • Click on the “Edit attributes” button.
    • Increase the “Connection idle timeout” value to 120 seconds.
    • Save your changes.
  3. Kubernetes (EKS):

    • Adjust the Kubernetes configuration to reflect the increased timeout.
    • If you’re using the Kubernetes Ingress controller, you can set timeouts in the Ingress object.
    • Here’s an example YAML configuration:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: my-ingress
spec:
  rules:
  - http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: my-service
            port:
              number: 80
  timeout:
    connect: 5s
    server: 120s
  • In the above example, timeout.server sets the server timeout to 120 seconds. Adjust this according to your needs.
  1. Application:
    • Ensure that the application running on your EC2 instances handles requests within the specified timeout window. This may involve adjusting server configurations or application code.

After making these changes, your API should have a timeout of 120 seconds when accessed through the ELB. Be sure to test your configuration to ensure that the timeout is functioning as expected.

Hi, can you try to increase the value of this advanced setting in Qovery? Service Advanced Settings | Docs | Qovery

This might help. If it’s not the case, please let me know.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.