-
Notifications
You must be signed in to change notification settings - Fork 293
After some number of invocations, importing a module fails, and then fails for all subsequent invocations #243
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
I'm not going to look into this right away, but for me or someone else, can you provide a little more context/details from the CloudWatch Logs? Specifically, I'm curious if this problem happens on a Lambda that is freshly booted, or if it's using a previously started/re-used container. To help detect this, add a print('container_started') somewhere in your top-level file not inside the lambda_handler function and then get us some cloudwatch logs. Thanks! |
To add to @AndrewFarley's suggestion, make sure you put that print statement before the unzip_requirements import. I'd guess that something is causing it to run out of disk space, but I reviewed the source for unzip_requirements, so I'm not sure why that would happen 😖 |
Thanks @AndrewFarley and @dschep . I added |
Here are my own logs, and the code at the top of the handler file:
logs:
I think unzip_requirements is supposed to do do so on |
I discovered that I was mistakenly using version 3.3.1. I have not experienced this issue since upgrading to 4.2.1 five days ago. I apologize for the inconvenience. |
I'm on 4.1.1. |
FWIW, I've determined that this is simply the 512 MB limit of It would be great if a solution could be devised where the built-in |
Yup, |
@gavinmh EDIT: Just found out that you need to specify the xgboost version, otherwise it will throw the size limit error. dunno why.. but it's fixed. |
This plugin is very helpful, thank you.
I have a Lambda function that is invoked every 30 minutes. After deployment, the function operates as expected. After some number of invocations, it fails with the following:
Every subsequent invocation then fails. After redeploying, it operates correctly again.
The following are my
requirements.txt
:My
lambda_handler.py
starts with:The following is from my
serverless.yml
:Any help is appreciated.
The text was updated successfully, but these errors were encountered: