serving icon indicating copy to clipboard operation
serving copied to clipboard

Getting "error: "context canceled" issue with knative service queue proxy

Open adviteey1 opened this issue 3 years ago • 1 comments

Hi,

Getting below error intermittently in the queueproxy container

error: "context canceled" knative.dev/key: "test-common-service/test-app-0-0-0" knative.dev/pod: "test-app-0-0-0-deployment-xxxxxxx-xxxxx" logger: "queueproxy" message: "error reverse proxying request; sockstat: sockets: used 44 TCP: inuse 27 orphan 2 tw 20 alloc 593 mem 52 UDP: inuse 0 mem 3 UDPLITE: inuse 0 RAW: inuse 0 FRAG: inuse 0 memory 0

stacktrace: "knative.dev/pkg/network.ErrorHandler.func1 knative.dev/[email protected]/network/error_handler.go:33 net/http/httputil.(*ReverseProxy).ServeHTTP net/http/httputil/reverseproxy.go:300 knative.dev/serving/pkg/queue.(*appRequestMetricsHandler).ServeHTTP knative.dev/serving/pkg/queue/request_metric.go:199 knative.dev/serving/pkg/queue.ProxyHandler.func1.2 knative.dev/serving/pkg/queue/handler.go:64 knative.dev/serving/pkg/queue.(*Breaker).Maybe knative.dev/serving/pkg/queue/breaker.go:155 knative.dev/serving/pkg/queue.ProxyHandler.func1 knative.dev/serving/pkg/queue/handler.go:62 net/http.HandlerFunc.ServeHTTP net/http/server.go:2047 knative.dev/serving/pkg/queue.ForwardedShimHandler.func1 knative.dev/serving/pkg/queue/forwarded_shim.go:54 net/http.HandlerFunc.ServeHTTP net/http/server.go:2047 knative.dev/serving/pkg/http/handler.(*timeoutHandler).ServeHTTP.func4 knative.dev/serving/pkg/http/handler/timeout.go:117"

knative v1.2.5 istio 1.12.7

Can someone please let me know how can I fix this.

Thank you!

adviteey1 avatar Jul 27 '22 13:07 adviteey1

Technically this log line should probably be a warning - I believe context cancelled can happen for a variety of reasons.

  1. Request is cancelled by the client
  2. Your app/container doesn't respond to before the configured revision timeout occurs.

The timeout is configurable on the revision

Can you confirm if this is happening for other reasons?

/triage needs-user-input

dprotaso avatar Jul 29 '22 15:07 dprotaso

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Oct 28 '22 01:10 github-actions[bot]

This issue or pull request is stale because it has been open for 90 days with no activity.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close

/lifecycle stale

knative-prow-robot avatar Nov 27 '22 02:11 knative-prow-robot