1

I have a distributed Openwhisk setup, and when I execute a large number of functions simultaneously like this

wsk -i action invoke test -r -b

at some point instead of getting the actual result, I start getting the following message:

ok: invoked /_/test, but the request has not yet finished, with id

Any idea how I could force Openwhisk execute the function and still return the result regardless how long the invocation actually takes? Is there maybe some playbook variable responsible for timeout?

Green Fireman
  • 617
  • 1
  • 11
  • 27
  • Yes: Add more capacity. If you’re overloading the system say, then requests will queue. The HTTP request is terminated after 60s. You can change the timeout for termination but then you’re holding on to more resources longer and can exhaust those too. – user6062970 Sep 12 '18 at 12:51
  • This answered the question for me: https://stackoverflow.com/a/56144600/2873507 – Vic Seedoubleyew Jul 29 '19 at 16:31

1 Answers1

1

You can execute a function in non-blocking mode. In this case, you will get the activation ID immediately and function execution will happen in the background. You can then check/track the status of function execution with the activation ID.

Remove the "-b" option from the command.

Also, a function execution timeout is configurable (default 60s), if function execution requires more time to execute, you can define it while creating the function.

For per function limit you can specify below setting when creating the function.

-t, --timeout LIMIT          the timeout LIMIT in milliseconds after which the action is terminated (default 60000)