When i tried to add "Add-CORS" Assign message policy to an existing API proxy i got this Error repeatedly. I tried to undeploy and re-deploy the App but none worked.

Not applicable

Server Error. Bundle size is greater than the 15 MB. Use large resources at organization/environment level

Solved Solved
0 5 447
1 ACCEPTED SOLUTION

Not applicable

Thanks, @Ashutosh Jha for the question. This is a known issue due to the size of the file.

If your API is based on XML policies and JavaScript, the size of the bundle shouldn't exceed a couple of MBs. However, if your API Proxy is based on Node.js and you're uploading Node.js modules, you may exceed 10 MBs, which should somewhere around that limit. Is there a reason for the size of the bundle?

In order to overcome this issue you have three options:

1) trim down your API Proxy resources from unnecessary files

2) Import resources separately through the Management API

3) try running NPM install on the server through the Management API

CC - @Srini Chebrolu, @oponce@apigee.com, @arghya das, @charles

View solution in original post

5 REPLIES 5

@Ashutosh Jha Which error? Can you please attach a screenshot or paste the error message?

Sorry @sudheendra1 i forgot to mention that.

Server Error. Bundle size is greater than the 15 MB. Use large resources at organization/environment level

Not applicable

Thanks, @Ashutosh Jha for the question. This is a known issue due to the size of the file.

If your API is based on XML policies and JavaScript, the size of the bundle shouldn't exceed a couple of MBs. However, if your API Proxy is based on Node.js and you're uploading Node.js modules, you may exceed 10 MBs, which should somewhere around that limit. Is there a reason for the size of the bundle?

In order to overcome this issue you have three options:

1) trim down your API Proxy resources from unnecessary files

2) Import resources separately through the Management API

3) try running NPM install on the server through the Management API

CC - @Srini Chebrolu, @oponce@apigee.com, @arghya das, @charles

I am trying to deploy an apigee 127 project on edge, facing issue.

I followed below steps, can you please help me with fixing the issues?

  1. create project
> a127 project create xyz
	

  • go to project directory
  • > cd xyz
    	
  • run apigeetool to install project to edge (note running this from the current project directory)
  • > apigeetool deploynodeapp --api xyz --organization {abc} --environments test --base-path /v1/xyz --username {username} --password {password} --debug --verbose --virtualhosts default,secure,https_vhost
    	
    {username} and {password} : are my edge credentials (works fine), no problem there.
    

    Note, deployment goes well, I could see api works fine, deployed to given environment. 2 things I would like to to mention;

    1. I want to preserve policies so I go to edge, create revision 2 on edge via UI from deployed revision 1 (step 3), works fine, now on revision 2 - > I create few edge policies and try to deploy on revision 2, and when I do that, I see below error;

    "Bundle size is greater than the 15 MB. Use large resources at organization/environment level".

  • In order to fix this I came to this link, realise that when deploying have to make sure I dont upload node module instead should have resolved modules on edge itself with apigeetool's resolve module parameter - https://www.npmjs.com/package/apigeetool#optional-parameters (look for --resolve-modules -R)
  • So then I deleted the deployed proxy "gts-configuration-v2" from edge (so everything is clean) and deployed it with --resolve-modules option;"apigeetool deploynodeapp --api gts-configuration-v2 --organization bugaboo --environments test --base-path /v2/configuration --username {username} --password {password} --debug --resolve-modules --verbose --virtualhosts default,secure,https_vhost"

    I was just wondering, I could see "uploading..." lines while this deployment was on my command prompt (with of course --verbose argument)

    "...................................
    ...................................
    Uploading resource app.js
    Uploading resource config/.a127_env
    Uploading resource config/.a127_secrets
    Uploading resource config/default.yaml
    Uploading resource config/README.md
    Uploading resource deployments/.gitignore
    Uploading resource deployments/README.md
    Uploading resource node_modules_request.zip of size 1147087
    Uploading resource node_modules_async.zip of size 785307
    Uploading resource node_modules_express.zip of size 1509243
    Uploading resource node_modules_should.zip of size 139070
    Uploading resource node_modules_supertest.zip of size 293389
    Uploading resource node_modules_volos-analytics-common.zip of size 23311
    Uploading resource node_modules_volos-analytics-apigee.zip of size 1240649
    Uploading resource node_modules_volos-analytics-memory.zip of size 33522
    Uploading resource node_modules_volos-cache-apigee.zip of size 71475
    Uploading resource node_modules_a127-magic.zip of size 7036219
    Uploading resource node_modules_volos-cache-memory.zip of size 75863
    Uploading resource node_modules_volos-cache-redis.zip of size 129946
    Uploading resource node_modules_volos-oauth-apigee.zip of size 1683028
    Uploading resource node_modules_volos-quota-memory.zip of size 59888
    Uploading resource node_modules_volos-quota-redis.zip of size 133438
    Uploading resource node_modules_volos-oauth-redis.zip of size 195276
    Uploading resource node_modules_volos-quota-apigee.zip of size 1328035
    Uploading resource package.json
    Uploading resource README.md
    Uploading resource node_modules_volos-spikearrest-memory.zip of size 54443
    ............................
    ............................
    "
    

    This surprised me, reason why my local node module are getting uploaded when I provided "--resolve-modules" option in deployment command? Anyway, deployment is always successful but then the purpose is not resolved, so when I go to edge (after this deployment) I get the same error when attach any edge policy.. "Bundle size is greater than the 15 MB. Use large resources at organization/environment level". As it seems even with "--resolve-modules" option my local node_module is getting uploaded, not sure why ? I am on windows 7 machine, even unistalled node js yesterday and did all above steps with latest stable release but nothing helps, can you please check and help?

    Regards, Kuldeep Bhati

    Not applicable

    Hi All,

    Thanks for this thread!

    I have a 42MB node micro-service (not my bloat) - I blame "lodash" and "yadda", etc for daft packaging 😉

    This saved my showcase.

    $ apigeetool deployproxy -u $APIGEE_USER -p $APIGEE_PASSWORD -o $APIGEE_ORG -e $APIGEE_ENV -n $APIGEE_PROXY -d . -V -R

    The trick was to use the -R option to resolve NPM packages on Edge rather than -U to upload them.

    I used this Gruntfile snippet:

    module.exports = function(grunt) {
    
      grunt.initConfig({
        shell: {
             options: {
                 stderr: false,
                 failOnError : true
             },
             apigee_npm_node_modules : {
                  command: "npm install --prefix './apiproxy/resources/node'",
             },
             apigeetool: {
                 command: "apigeetool deployproxy  -u $APIGEE_USER -p $APIGEE_PASSWORD -o $APIGEE_ORG -e $APIGEE_ENV  -n $APIGEE_PROXY -d . -V -R",
                 options: {
                     execOptions: {
                         cwd: './target'
                     }
                 }
             }
         }
    
    });
    
      grunt.loadNpmTasks('grunt-shell');
    
      grunt.registerTask('default', ['shell']);
    
    };