Server Error. Bundle size is greater than the 15 MB. Use large resources at organization/environment level
Solved! Go to Solution.
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
Sorry @sudheendra1 i forgot to mention that.
Server Error. Bundle size is greater than the 15 MB. Use large resources at organization/environment level
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?
> a127 project create xyz
> cd xyz
> 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;
"Bundle size is greater than the 15 MB. Use large resources at organization/environment level".
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
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']); };
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |