Long-lived functions
A long-lived function is one with a timeout of over ten minutes in its version settings. For the maximum possible timeout value, see Limits.
Note
This feature is in the Preview stage. To get access, contact tech support
The longer the function runs, the higher is the probability of related network failures. When invoking long-lived functions, we recommend using asynchronous invocation.
Forced termination of a long-lived function instance
In some cases, the service may forcibly terminate a long-lived function instance processing a call before the timeout specified in the function version settings is reached.
In such cases, the custom code of the function will receive a notification about the upcoming forced termination of the function instance. Such a notification is sent to the function ten minutes before the actual forced termination.
Once the notification about the upcoming forced termination of the function instance is sent:
- The function instance has up to ten minutes to complete processing the current calls.
- The function instance will no longer be receiving new calls.
- The function instance will be forcibly stopped as soon as it completes processing all the current calls or after ten minutes, whichever comes first.
Warning
If there are less than ten minutes left before the timeout specified in the function version settings expires, no notification about the forced termination of the function instance will be sent to the function custom code.