Description
A Knative Service’s spec.template.spec.timeoutSeconds sets the request timeout. If omitted, the cluster’s revision-timeout-seconds default applies; omission does not itself mean unlimited processing.
Potential impact
An overly long timeout increases resource occupancy, while an overly short one can interrupt valid requests.
Remediation
Check actual processing times and cluster defaults, and specify timeoutSeconds when needed. Align it with the cluster maximum and application-level work cancellation.
Examples
These examples compare the default with an explicit 600-second timeout. This is not a universal recommendation: it assumes a cluster that allows 600 seconds and work requiring that duration. Replace the example image with the actual image.
Before
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: dummy
spec:
template:
spec:
containers:
- name: app
image: images.my-company.example/app:v4
containerConcurrency: 100
After
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: dummy
spec:
template:
spec:
containers:
- name: app
image: images.my-company.example/app:v4
containerConcurrency: 100
timeoutSeconds: 600