Customizing the Environment
Configuring Keep Warm
Control how long your apps stay running before shutting down.
By default, Beam is serverless, which means your applications will shut off automatically when they’re not being used.
You can control how long your containers are kept alive by using the keep_warm_seconds
flag in your deployment trigger.
For example, by adding a keep_warm_seconds=300
argument to a REST API, your app will stay running for 5 minutes before shutting off:
@app.rest_api(
keep_warm_seconds=300,
)
Was this page helpful?