-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
on MacOS, mounting /tmp/localstack makes lambdas slow #2515
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
Comments
Thanks for reporting @yonahforst . Not sure if this is a bug per se, but performance can indeed become a bit slow if you're using large Lambda archives in the mounted tmp folder under MacOS. Would you mind creating a pull request with a small note in the README that describes your fix (perhaps in the Troubleshooting section)? Apart from the documentation change, is there anything else you think we can/should do here? Thanks |
Thanks again. A short note on performance and Lambda mounting has now been added to the Troubleshooting part of the README: https://github.com/localstack/localstack#troubleshooting |
This is a dead link. Does this documentation live somewhere else now? |
@whummer Is there any place where I can find this explained in the official docs? |
Hi @jgonera , we have restructured our docs in the meantime - the best way to get started with Lambda code mounting (hot swapping) is to follow our docs here: https://docs.localstack.cloud/tools/lambda-tools/hot-swapping/#code-hot-swapping-for-python-lambdas Please keep us posted on how it goes - happy to provide more guidance if you have more specific questions regarding Lambda performance and/or code mounting.. 👍 Thanks |
@whummer That was useful but I'm still not sure why we need the |
Type of request: This is a ...
[x] bug report
[ ] feature request
Detailed description
When running localstack on MacOS using the example
docker-compose.yml
, Lambda functions can take a long time to start up.I think this is because of existing performance issues with
osxfs
, the file system server in Docker for Mac.If your using
LAMBDA_EXECUTOR=docker
, the copying of zipped code to newlambci/lambda
containers can take a very long time.If you're using
serverless-localstack
, enablingmountCode
solves the slow copying, but then actually requiring your code inside the lambda function can take a long time (mostly because of node_modules).To solve this, I disabled mounting
/tmp/localstack
in mydocker-compose.yml
...
Expected behavior
...
Actual behavior
...
Steps to reproduce
Command used to start LocalStack
...
Client code (AWS SDK code snippet, or sequence of "awslocal" commands)
...
The text was updated successfully, but these errors were encountered: