-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Knative Timeout Issues with Long-Running Requests #15352
Comments
**UPDATE: ** I added extra logging to the activator deployment, and was able to logout the cancellation.
this indicates the channel being hit is:
that is causing the cancellation. Running validation with extending this. |
After extending: it no longer timed out. I've now recorded 4 possible places that can cause a timeout:
This can be closed if this is expected behavior. Maybe an enhancement of documentation is needed? Because |
I'm experiencing this very issue when upgrading to Knative @nkreiger I've followed your suggestion to set My configs, for testing (I'm using the Knative Operator): apiVersion: operator.knative.dev/v1beta1
kind: KnativeServing
metadata:
name: knative-serving
namespace: knative-serving
spec:
config:
defaults:
enable-service-links: 'false'
max-revision-timeout-seconds: '3600'
revision-response-start-timeout-seconds: '3600'
revision-timeout-seconds: '3600'
features:
kubernetes.podspec-init-containers: enabled
kubernetes.podspec-persistent-volume-claim: enabled
kubernetes.podspec-persistent-volume-write: enabled |
@CarlosDomingues did you confirm that the activator restarted? I usually check ^ and do a You can check the knative services / edit the value directly by setting it to confirm that it has been mapped appropriately. My guess, is it didn't kick in yet. responseStartTimeoutSeconds: 18500
serviceAccountName: github
timeoutSeconds: 18500 |
@nkreiger Thanks for the help! After seeing your comment on Slack I recreated the whole cluster / reinstalled Knative just in case, but unfortunately that did not work. I think the next step is trying to check the service itself. |
Yes, I would check that. For me, the defaults didn't kick in -- I had to explicitly set it on the service in some namespaces. (still investigating why it worked for others...) |
That worked for me. Thank you so much for sharing your solution! For reference, my services are now looking like so: apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: my-project
namespace: my-namespace
spec:
template:
metadata:
annotations:
autoscaling.knative.dev/scaleDownDelay: "5m"
spec:
<...>
timeoutSeconds: 3600
responseStartTimeoutSeconds: 3600 # < --- Relevant config |
This issue is stale because it has been open for 90 days with no |
Re-Opening this issue. I'm having issues with
~ » k get cm -n knative-serving config-defaults -o yaml
apiVersion: v1
data:
enable-service-links: "false"
max-revision-timeout-seconds: "604800"
revision-idle-timeout-seconds: "0"
revision-response-start-timeout-seconds: "18500"
revision-timeout-seconds: "18500" There is no Activator Error
I didn't recently upgrade, but this is the first time we've had 30+ minute processes. Trigger Timeout:
Activator
|
sorry to bother you @skonto could this issue be re-opened? I believe I've covered every area that should justify a timeout. Looking to see if anything is missing here. |
In what area(s)?
/area autoscale
What version of Knative?
Expected Behavior
Knative Service Pod and Queue Proxy respect the revision timeout passed.
Actual Behavior
Knative queue-proxy throws error:
This causes an endless amount of retries resulting in:
a bunch of pods that have to be manually deleted.
Steps to Reproduce the Problem
Apply the following configmap:
Restart knative serving
Apply a new knative service, that has a delay in it
Apply a new trigger reading from a broker
Send a request to that broker, that will activate the trigger:
logs from service
logs from queue proxy
timeout difference: 2024-06-26T00:58:17Z vs 2024-06-26T01:08:15.397562115Z
indicating a 10 minute timeout.
error from activator:
activator termination
line of code in activator that starts timeout:
activator request timeou
seems to be referencing: https://github.com/knative/serving/blob/main/pkg/apis/config/defaults.go#L45
(the max timeout) instead of the specified max timeout from me.
More Validation
My knative service spec:
timeoutSeconds
doesn't seem to be respected.I also built the activator from source, and added loggin:
Is what I added:
From Broker:
With Curl
So, it looks like the timeout is being set properly from the
spec.TimeoutSeconds
My only thoughts now, are is my delivery timeout not being respected:
But this does not make sense. Because I reproduce with curl:
which wouldn't even go through kafka, and I get the same timeout.
Is there something I need to do on the kafka side?
The text was updated successfully, but these errors were encountered: