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

OSError: [Errno 28] No space left on this device on slim_handler=true #961

Closed
abhisuri97 opened this issue Jun 25, 2017 · 4 comments
Closed

Comments

@abhisuri97
Copy link

Context

When uploading my zipped lambda package with zappa, I get a 'no space left on this device' error after calling zappa tail

This is a fairly large project, so it is totally reasonable that Lambda might not be the best fit for it. I need tensorflow dependencies as well as a fairly large model.

My total unzipped files are 498 MB (very close to 512 MB).

When zappa zips up everything it comes out to 213 MB for the project zip (unzipped is 492 MB) and 9.2 MB for the handler zip (unzipped is 47 MB).

While I know that 492 is cutting it very close to the 512 /tmp limit, it doesn't go over it...unless the 47 MB from the handler is counted in that as well...

Expected Behavior

Should be able to upload files in their entirity

Actual Behavior

I get this error when visiting the lambda URL:

"{'message': 'An uncaught exception happened while servicing this request. You can investigate this with the `zappa tail` command.', 'traceback': ['Traceback (most recent call last):\\n', '  File \"/var/task/handler.py\", line 433, in handler\\n    response = Response.from_app(self.wsgi_app, environ)\\n', '  File \"/var/task/werkzeug/wrappers.py\", line 903, in from_app\\n    return cls(*_run_wsgi_app(app, environ, buffered))\\n', '  File \"/var/task/werkzeug/wrappers.py\", line 57, in _run_wsgi_app\\n    return _run_wsgi_app(*args)\\n', '  File \"/var/task/werkzeug/test.py\", line 884, in run_wsgi_app\\n    app_rv = app(environ, start_response)\\n', \"TypeError: 'NoneType' object is not callable\\n\"]}"

and when looking through the tail log i get the OSError in the title.

Possible Fix

Steps to Reproduce

  1. unzip the directory i link below, cd into it, activate the virtual environment (venv) and deploy with zappa.

Your Environment

  • Zappa version used: 0.42.2
  • Operating System and Python version: Mac OS 10.12.5, python3.6
  • The output of pip freeze:
argcomplete==1.8.2
backports.weakref==1.0rc1
base58==0.2.4
bleach==1.5.0
boto3==1.4.4
botocore==1.5.40
certifi==2017.4.17
chardet==3.0.4
click==6.7
docutils==0.13.1
durationpy==0.4
Flask==0.12.2
future==0.16.0
futures==3.1.1
hjson==2.0.7
html5lib==0.9999999
idna==2.5
itsdangerous==0.24
Jinja2==2.9.6
jmespath==0.9.3
kappa==0.6.0
lambda-packages==0.15.1
Markdown==2.2.0
MarkupSafe==1.0
numpy==1.13.0
placebo==0.8.1
protobuf==3.3.0
python-dateutil==2.6.0
python-slugify==1.2.4
PyYAML==3.12
requests==2.18.1
s3transfer==0.1.10
six==1.10.0
tensorflow==1.2.0
toml==0.9.2
tqdm==4.14.0
troposphere==1.9.4
Unidecode==0.4.20
urllib3==1.21.1
Werkzeug==0.12
wsgi-request-logger==0.4.6
zappa==0.42.2
{
    "dev": {
        "app_function": "predict.app",
        "profile_name": "default",
        "s3_bucket": "zappa-gpmb4b44m",
        "runtime": "python3.6", 
        "slim_handler": true,
        "aws_region": "us-west-2",
        "use_precompiled_packages": true,
        "memory_size": 1024
    }
}
@jwkvam
Copy link
Contributor

jwkvam commented Jun 25, 2017

duplicate of this? #881

@abhisuri97
Copy link
Author

Kinda. i am not sure what the recommended fix is for re issue #881

@mcrowson
Copy link
Collaborator

Yea that is likely the same issue. If you want to take a stab at doing a streaming unzip it might fit, but that still looks pretty close to the limit.

@mcrowson
Copy link
Collaborator

Closing due to gzip streaming approach.

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

3 participants