Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Migrated] Multiple keep warm #173

Closed
jneves opened this issue Feb 20, 2021 · 0 comments
Closed

[Migrated] Multiple keep warm #173

jneves opened this issue Feb 20, 2021 · 0 comments

Comments

@jneves
Copy link
Contributor

jneves commented Feb 20, 2021

Originally from: Miserlou/Zappa#861 by mcrowson

Description

The keep_warm setting now takes an integer for the number of concurrent containers to keep warm. This is done by the keep_warm_callback in the handler.py file using a thred pool to call zappa async tasks that each initialize the application.

Those initialized applications then wait 30 seconds before returning to allow for other other lambdas to cold start rather than reuse the newly warmed container.

Somewhat arbitrary values were set for the ThreadPool size and the sleep size. If the user has specified a timeout_seconds < 30, it will exit sooner.

The time to run the keep_warm_callback with 200 as the value was 15 seconds. If the time.sleep is too low, then it is possible for some percentage of the keep_warm_lambda_initializers to use warm containers.

GitHub Issues

#851

@jneves jneves closed this as completed Feb 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant