Long-lived containers
A long-lived container is one with a timeout of over ten minutes in its revision settings. For the maximum possible timeout value, see Limits.
The longer the container runs, the higher is the probability of related network failures. We recommend using asynchronous invocation for long-lived containers.
Forced termination of a long-lived container instance
In some cases, Serverless Containers may forcibly terminate a long-lived container instance processing a call before the timeout specified in the container revision settings is reached.
In such cases, the user application will receive a notification about the upcoming forced termination of the container instance. This notification is sent ten minutes before the actual forced termination of the instance.
Once the notification about the upcoming forced termination of the container instance is sent:
- The container instance has no more that ten minutes to finish the processing the current calls.
- The container instance stops receiving new calls.
- The container instance will be forcibly stopped as soon as it is done 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 container revision settings, no notification about the forced termination of the container instance will be sent to the user application.