Giter Site home page Giter Site logo

Comments (5)

andresmgot avatar andresmgot commented on June 28, 2024

The reason why that's a warning and not an error is because it's difficult to know the size in which the file will be too big. We now that the limitation of an etcd entry is 1MB but in our case the size should be calculated for the entire object not just the function file. That means that a huge dependencies file and a small zip will be an issue too. For that reason we let the user receive the error from the K8s API:

Serverless: WARNING! Function zip file is 10MB. The maximum size allowed is 1MB: please use package.exclude directives to include only the required files
Serverless: Deploying function hello...

  Error --------------------------------------------------

  Found errors while processing the given functions:
Error: Unable to deploy the function hello. Received:
  Code: 500
  Message: rpc error: code = ResourceExhausted desc = grpc: trying to send message larger than max (13814928 vs. 2097152)

     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

from serverless-kubeless.

dwelch2344 avatar dwelch2344 commented on June 28, 2024

Running into this now with a fairly large serverless package. Is there any way to increase the limit to get around this?

from serverless-kubeless.

andresmgot avatar andresmgot commented on June 28, 2024

hi @dwelch2344,

In theory, in the serverless package you should only include source code (so it's difficult to hit the limit of 1MB). If you are including some unnecessary files you can use the exclude: field to avoid adding those files.

from serverless-kubeless.

ned-kelly avatar ned-kelly commented on June 28, 2024

Running into this problem also ... I've got a pre-compiled "chromium" binary that's packaged up as part of my deployment - Works fine in AWS Lambda, however not Kubeless...

https://kubeless.io/docs/advanced-function-deployment/ - Documentation here explains that the "function" can actually be a link to a ZIP file that is downloaded upon initial execution of the function...

What would be the chances of implementing this?

from serverless-kubeless.

andresmgot avatar andresmgot commented on June 28, 2024

Hi @ned-kelly,

It doesn't work right now with the serverless plugin but you can upload the zip file somewhere (accessible from within your cluster) and use the URL to deploy the function using kubeless CLI:

kubeless function deploy --from-file http://.../function.zip ...

That file doesn't have the restriction to be under 1MB. You can find more info here:
https://kubeless.io/docs/advanced-function-deployment/#deploying-large-functions

from serverless-kubeless.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.