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

unable to publish to sinopia 413 #83

Open
aikomastboom opened this issue Jun 3, 2014 · 3 comments
Open

unable to publish to sinopia 413 #83

aikomastboom opened this issue Jun 3, 2014 · 3 comments

Comments

@aikomastboom
Copy link

Upgrading our node stack the following came to light.

node 0.10.23 with npm 1.3.17.
doing a npm publish works fine for us.

upgrading to node 0.10.24 or higher with npm 1.3.21 or higher
results in the following error:

npm http PUT http://npm.adomain.net/a-package
npm http 413 http://npm.adomain.net/a-package
npm ERR! publish Failed PUT 413
npm ERR! Error: request entity too large : a-package
npm ERR!     at RegClient.<anonymous> (/var/lib/jenkins/.nave/installed/0.10.24/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:275:14)
npm ERR!     at Request.self.callback (/var/lib/jenkins/.nave/installed/0.10.24/lib/node_modules/npm/node_modules/request/request.js:123:22)
npm ERR!     at Request.EventEmitter.emit (events.js:98:17)
npm ERR!     at Request.<anonymous> (/var/lib/jenkins/.nave/installed/0.10.24/lib/node_modules/npm/node_modules/request/request.js:893:14)
npm ERR!     at Request.EventEmitter.emit (events.js:117:20)
npm ERR!     at IncomingMessage.<anonymous> (/var/lib/jenkins/.nave/installed/0.10.24/lib/node_modules/npm/node_modules/request/request.js:844:12)
npm ERR!     at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:920:16
npm ERR!     at process._tickCallback (node.js:415:13)
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21

on the sinopia side we see:

http  <-- 413, user: jenkins, req: 'PUT /a-package', error: request entity too large

a 0.10.23 publish looks like this:

http  <-- 409, user: jenkins, req: 'PUT /a-package', error: this package is already present
http  --> 404, req: 'GET https://registry.npmjs.org/a-package', bytes: 0/52
http  <-- 200, user: jenkins, req: 'GET /a-package', bytes: 0/2393441
http  <-- 201, user: jenkins, req: 'PUT /a-package/-/a-package-1.0.1-678.tgz/-rev/1341-a9d2ab1f359ff904', bytes: 17905144/43
http  <-- 201, user: jenkins, req: 'PUT /a-package/1.0.1-678/-tag/latest', bytes: 6737/31

note: This particular a-package is about 17Mb in size.
note 2: With node 0.10.23 we have no trouble publishing packages 250Mb in size.

@rlidwka
Copy link
Owner

rlidwka commented Jun 18, 2014

Please change your config to allow larger packages:

# maximum size of uploaded json document
# increase it if you have "request entity too large" errors
max_body_size: 10mb

The default is 10mb, and this limitation is done mostly for security reasons, because dealing with large packages is very memory-consuming. 17Mb won't be an issue, but 250Mb with newer npm versions can crash some systems.

rmg added a commit to strongloop/ephemeral-npm that referenced this issue Sep 15, 2015
The default is 10mb, which is too small for strong-arc.

See rlidwka/sinopia#83
@razbensimon
Copy link

Worked for me! Thanks

@hvpulok
Copy link

hvpulok commented Mar 29, 2018

Worked for me as well

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

4 participants