Increase timeout values on NGF

Please use this template for troubleshooting questions.

My issue: I see current : The default timeout looks to be set to 60 secs. I want it to be increased

How I encountered the problem: Application teams see connection drops for APIs which take more than 60 secs to respond with data

Solutions I’ve tried: Tried adding timeouts in httproute and configmaps but did not help

Version of NGF and/or NGINX:NGF:2.2.1

Deployment environment: Development

Thank you for your interest in the project.

To confirm my understanding, are you looking to increase the response timeout ? If so, could you clarify how you are currently configuring timeouts in NGINX Gateway Fabric? For example, are you using a SnippetsFilter, and if yes, at which context is it applied and the directive you are using? Some more information about your environment will help here as well.

Additionally, could you explain why you are attempting to configure timeouts via ConfigMaps? Understanding the underlying use case will help us prioritize the features in the future.

Thanks for your response.
I have created a SnippetsFilter as below

apiVersion: gateway.nginx.org/v1alpha1
kind: SnippetsFilter
metadata:
name: application-gateway-timeouts
namespace: application
spec:
snippets:
- context: http.server.location –> also tried http.server/server
value: |
proxy_connect_timeout 30s;
proxy_read_timeout 600s;
proxy_send_timeout 600s;

and added below filter to the HttpRoute

  • type: ExtensionRef
    extensionRef:
    group: gateway.nginx.org
    kind: SnippetsFilter
    name: application-gateway-timeouts

Related to ConfigMaps - I was testing for all the possibilities to modify the default value of 60s.

So the context depends on if you to apply it all location blocks for that server or just a particular path/location block.

Do these directives show up in your config file? You should also check status of the SnippetsFilter resource to ensure it is accepted.
To use snippetsFilter, you also need to enable it using a flag during install/upgrade for NGF. Here is a guide to help you navigate SnippetsFilter

I need to understand what specifically is not working here.

The Snippetsfilter guide helped, Thanks @salonichf5

1 Like

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