I’m trying to deploy a cloud function with Python using the python-opencv library, however I am getting a 413: Payload Too Large error. I read the documentation and it seems like DigitalOcean only supports a build of 48MB.
Is there anyway to increase this size limit? I know other services like AWS Lambda support up to 200mb.
If not, does anyone have a similar experience of trying to deploy a python function with large requirements? I tried building from the source rather than through pip but it just fails.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $200 of credit to try our products over 60 days!
Indeed the maximum size of the built function is 48 MB. Basically, everything under
<package-name>/<function-name>/is gathered into a single zip file. The final file needs to be within the 48 MB size limit.
You could try using a
.ignorefile to ignore any artifacts that you don’t need in order to reduce the overall file size:
Is your project open-source? If so feel free to share a link here and I could have a look and see if there is a way to reduce the size.