'Ambassador timeout_ms is not working, if value is greater than 30 secs

I am using Ambassador for external authentication and rerouting. I have created a service that sleeps for 31 secs and returns 200. I have deployed the service with the following annotation:

annotations:
getambassador.io/config: |
---
apiVersion: getambassador.io/v2
kind: Mapping
name: mapping-test-12000
namespace: test
service: test-service:12000
timeout_ms: 600000
connect_timeout_ms: 60000
prefix: /test-endpoint/
rewrite: /

All my HTTP calls are failing with 502 bad gateway. Looking at ambassador logs, it seems to be timing out after 30 secs: "POST /test-endpoint/run HTTP/1.1" 0 DC 16 0 30000 - , ," "insomnia/2021.7.2" "7819d615-9bdb-4f6b-a198-97f2ad89f023" "" "*:12000

I was expecting the timeout to be 10 mins, based on timeout_ms settings. If I put a value under 30 seconds for timeout_ms, it seems to be working correctly.

Below is the envoy route:

{
"match": {
"case_sensitive": true,
"prefix": "/test-endpoint/",
"runtime_fraction": {
"default_value": {
"denominator": "HUNDRED",
"numerator": 100
},
"runtime_key": "routing.traffic_shift.cluster_test_service_12000_test"
}
},
"route": {
"cluster": "cluster_test_service_12000_test",
"cors": {
"allow_credentials": true,
"allow_headers": "",
"allow_methods": "GET, HEAD, PUT, POST, DELETE, OPTIONS",
"allow_origin_string_match": [
{
"exact": ""
}
],
"filter_enabled": {
"default_value": {
"denominator": "HUNDRED",
"numerator": 100
},
"runtime_key": "routing.cors_enabled.**"
},
"max_age": "86400"
},
"prefix_rewrite": "/",
"priority": null,
"timeout": "600.000s"
}
}

Versions: Ambassador: 1.4.1 Kubernetes environment: GKE Kubernetes Version: 1.19.5



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source