openwhisk icon indicating copy to clipboard operation
openwhisk copied to clipboard

Could action timeout limit be unlimited or configurable?

Open acabarbaye opened this issue 6 years ago • 10 comments

Documentation states that the maximum time limit for an action is 5 minutes (300000ms) https://github.com/apache/openwhisk/blob/master/docs/reference.md#per-action-timeout-ms-default-60s Could this value be unlimited or configurable as some actions (e.g. extensive calculations, network bound actions) may take much longer than 5 minutes?

acabarbaye avatar May 15 '20 11:05 acabarbaye

@acabarbaye It is a cluster-wide configuration. You can change this value. https://github.com/apache/openwhisk/blob/master/common/scala/src/main/resources/application.conf#L393

style95 avatar May 15 '20 13:05 style95

@style95 : Thanks for the link. I got misled by the documentation. I thought only default values could be modified. Maybe a link to the application.conf should be added to that page as well.

acabarbaye avatar May 16 '20 09:05 acabarbaye

@style95 : I've tried to change this value to 500 mins. Now my action can run within 500 mins. I set the timeout to 10 mins, 20 mins, 60 mins and 500 mins. From activation log I see 10 mins works fine. For 20 mins, my action suddenly stops after 3 mins limit and returns error after 20 minutes. For 60 mins, the action stops after 15 mins returns after 124 mins. For 500 mins, my action didn't return after 20h. What should I do if I need the action to run several hours? Screen Shot 2020-07-01 at 13 14 31

yuqijin-cb avatar Jul 01 '20 17:07 yuqijin-cb

Have you checked the logs in the action or the invoker? This is impossible for us to diagnose with the information provided. It could be your action is running out of memory or just crashing, among other reasons.

rabbah avatar Jul 01 '20 17:07 rabbah

Closing as inactionable.

rabbah avatar Aug 06 '20 20:08 rabbah

I see that here is also a time-limit configuration. What is the difference between them? I deploy OpenWhisk with K8s.

https://github.com/apache/openwhisk/blob/625fc5b7593360bc01e74147c02ce5f1461b5cd3/core/invoker/src/main/resources/application.conf#L68

ZinuoCai avatar Mar 18 '21 02:03 ZinuoCai

@rabbah I also want to extend the running time of a function. I deploy my OpenWHisk with K8s. I change the application.conf in the scala directory and rebuild the controller image. I set it below.

time-limit {
    min = 100 ms
    max = 25 m
    std = 20 m
}

However, it does not work properly. The default running is still 1 minute. Anything else should I modify?

ZinuoCai avatar Mar 18 '21 09:03 ZinuoCai

I think you want to change this. https://github.com/apache/openwhisk-deploy-kube/blob/master/helm/openwhisk/values.yaml#L78

Regarding kubernetes timeouts, they are applied when you run a pod or get logs from a pod. https://github.com/apache/openwhisk/blob/master/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesClient.scala#L177

style95 avatar Mar 18 '21 09:03 style95

There are the timeouts that you set on individual actions (e.g., wsk action update --timeout) which can range from the deployment's min-max values. These apply per action.

rabbah avatar Mar 18 '21 12:03 rabbah

Thanks!

ZinuoCai avatar Mar 19 '21 02:03 ZinuoCai