1

We are using knative to serve a nodejs app (with express) that would execute workflows and return back the results of execution. The app would have to execute workflows which could take minutes (if not hours) to finish executing.

After invoking the app, execution stops after a certain time (approximately 14min) with the status: upstream request timeout

We modified the timeout accordingly for express and it seemed to have a slight effect, but not as much as needed. We used the following guide as baseline https://github.com/knative/docs/tree/master/docs/serving/samples/hello-world/helloworld-nodejs

Is there a config value that can be modified that would increase the execution of the app itself (perhaps a timeout value)?

Vedo
  • 83
  • 1
  • 2
  • 10

1 Answers1

2

UPDATED (25/6/19):

As per https://github.com/knative/serving/pull/4196, in Knative v0.7, you can now specify MaxRevisionTimeoutSeconds which can be any integer. timeoutSeconds must be less than or equal to MaxRevisionTimeoutSeconds. timeoutSeconds defaults to 300.

OLD: You can change timeoutSeconds (which I believe defaults to 300 seconds):

apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
  name: my-app
  namespace: default
spec:
  runLatest:
    configuration:
      revisionTemplate:
        spec:
          timeoutSeconds: 300
          ...
Matthew P
  • 717
  • 1
  • 7
  • 22
  • Thanks, we tried: `timeoutSeconds: 300`, and received: `Error from server (InternalError): error when creating 'knative-fn.yaml': Internal error occurred: admission webhook 'webhook.serving.knative.dev' denied the request: mutation failed: expected 0s <= 1800s <= 600s: spec.runLatest.configuration.revisionTemplate.spec.timeoutSeconds` – Vedo Apr 16 '19 at 08:08
  • @Vedo What version of Knative are you running? What integers have you tried for `timeoutSeconds`? Does the yaml apply correctly without the `timeoutSeconds`? Have you tried reconfiguring/applying all of the Knative yaml files to make sure Knative is setup correctly on your cluster? Are all of the Knative pods healthy? Matthew – Matthew P Apr 16 '19 at 12:55
  • I’m running v0.5.0 version of Knative (build, serving and eventing). I’ve tried integers from 300 to 1800 seconds, but everything above 600 seconds throws an error. The yaml file applies correctly without timeoutSeconds, but it averages to 300s which is too little. All of the Knative deployments and pods in the cluster are healthy, ready and running. – Vedo Apr 17 '19 at 14:26
  • If you don't include `timeoutSeconds` it defaults to 300. I've recieved the same issue of the 600s max - we haven't setup any of our long running tasks until now... I've raised an issue on github: https://github.com/knative/serving/issues/3826 – Matthew P Apr 19 '19 at 14:01
  • 1
    @vedo updated answer with changes from the release of Knative v0.7 – Matthew P Jun 25 '19 at 17:15