-
Notifications
You must be signed in to change notification settings - Fork 753
functions should have a timeout #365
Comments
Is there any alternative for this? |
@kishoreacesurf what do you mean with alternative? |
@alban @kishoreacesurf the feature is available since with Kubeless v0.3.0. The default timeout is set to 180s but you can modify this value using the flag |
@andresmgot what is the maximum value that can be specified for |
that may depend on the runtime, note that we are just setting the value of the timeout reading it from an env var that we set depending on the value set with |
AWS lambda has a hard timeout like 30s. I would like to have this behavior before using in production. for Node.js: Here is my thought: |
As far as Node.js is concerned, I think that’s the best in-process solution for working around nodejs/node#3020. |
That may be interesting to investigate. Could someone work in a POC of how that might work? The code of the NodeJS runtime is here: https://github.com/kubeless/runtimes/blob/master/stable/nodejs/kubeless.js I am not sure if we can maintain the current function isolation if we change the approach. Also note that the use case between lambda and kubeless changes. With lambda you are being charged for execution time (which is not the case in Kubeless). That's why timeouts here are bigger. In any case, it's true that timeouts should work as expected. |
To protect against infinite loops taking the cpu, functions should have a timeout.
Example of function in Python to test this:
Once the function is triggered, the user cannot cancel the execution of the function without killing the process or the pod.
AWS Lambda have the following timeout:
The text was updated successfully, but these errors were encountered: