Skip to content

Receiving response even after the timeoutSeconds is reached #15486

@karanibm6

Description

@karanibm6

For a knative revision, one can send the response headers and some data before the timeout. It is then seemingly possible to write data longer than the timeout, possibly forever. This is imo not how Knative defines the timeout seconds:

$ kubectl explain ksvc.spec.template.spec.timeoutSeconds
GROUP:      serving.knative.dev
KIND:       Service
VERSION:    v1

FIELD: timeoutSeconds <integer>

DESCRIPTION:
    TimeoutSeconds is the maximum duration in seconds that the request instance
    is allowed to respond to a request. If unspecified, a system default will be
    provided.

What version of Knative?

v1.15.2

Expected Behavior

The request should timeout when the timeoutSeconds is reached.

Actual Behavior

The request doesn't timeout within timeoutSeconds

Steps to Reproduce the Problem

  1. Create a KSvc using the image ghcr.io/src2img/http-synthetics:latest (code is from https://github.com/src2img/http-synthetics), Use minScale and maxScale 1. and set timeoutSeconds to 30s
  2. Wait for the Ksvc to become ready.
  3. Call its endpoint with curl -X PUT http://endpoint/write-regularly?interval=10&count=5

You will observe that you will get the response after 50s. and the request doesn't times out in 30s.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions