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

Iron-Router Error: request entity too large at makeError #78

Closed
michaelleuzinger opened this issue Jun 3, 2015 · 12 comments
Closed

Iron-Router Error: request entity too large at makeError #78

michaelleuzinger opened this issue Jun 3, 2015 · 12 comments

Comments

@michaelleuzinger
Copy link

Hi,

I'm trying to upload json data to my application via a POST request to the Restivus REST API. The json data has about 350kByte of size.

Unfortunately I receive this error message: "Error: request entity too large at makeError"
I suppose I found the solution here: iron-meteor/iron-router#710

How can I achieve this in Restivus? Is there a way to configure the routers centrally like the Restivus.configure() stuff?

@michaelleuzinger michaelleuzinger changed the title Error: request entity too large at makeError Iron-Router Error: request entity too large at makeError Jun 3, 2015
@kahmali kahmali added the bug label Jun 3, 2015
@kahmali
Copy link
Owner

kahmali commented Jun 3, 2015

Let me check if this is specific to Iron Router (the Iron Router dependency has been removed from Restivus in the unreleased v0.7.0). From the issue you referenced, it appears it may be a property that can be set on the Connect bodyParser middleware (this middleware is used in the Iron Router replacement, JsonRoutes, as well). I'll look into providing an option in Restivus for increasing the size limit. I probably won't have a chance to look into this until later tonight. I'll keep you posted. Sorry for the inconvenience!

@joetm
Copy link

joetm commented Jun 10, 2015

I am having the same issue.

@kahmali
Copy link
Owner

kahmali commented Jun 10, 2015

This could be a fairly simple fix if it's just a matter of setting a config option in the bodyParser. I'll look into this tonight and get back to you. I'm going to do this on the 0.7.0 branch, because I just can't deal with Iron Router and all the headache that comes along with that anymore. I will make a strong effort to do the 0.7.0 release this weekend, or no later than next week. It's all the doc updates that are taking the longest.

@kahmali
Copy link
Owner

kahmali commented Jun 15, 2015

Would either of you be able to share a sample request body with me for testing? If it's too large to post here you can email it to me.

@michaelleuzinger
Copy link
Author

I'll try to do so tomorrow morning (GMT+1) - so in about 14 hours.

Kahmali Rose notifications@github.com schrieb am Mo., 15. Juni 2015 um
20:13 Uhr:

Would either of you be able to share a sample request body with me for
testing?


Reply to this email directly or view it on GitHub
#78 (comment)
.

@kahmali
Copy link
Owner

kahmali commented Jun 17, 2015

Awesome. Thanks @michaelleuzinger!

michaelleuzinger added a commit to michaelleuzinger/files that referenced this issue Jun 18, 2015
@michaelleuzinger
Copy link
Author

Late but hopefully not too late...
https://github.com/michaelleuzinger/files/blob/master/large.json

@samylaumonier
Copy link

You have to configure the bodyParser on the server side in order to allow bigger requests :

Router.configureBodyParsers = function() {
    Router.onBeforeAction(Iron.Router.bodyParser.urlencoded({
        extended: true,
        limit: '20mb'
    }), {where: 'server'});
};

@kahmali
Copy link
Owner

kahmali commented Jun 24, 2015

Thanks for the test data @michaelleuzinger! And thanks for the information @samybob1! I would add an API config option to get rid of the boilerplate, but I'm close to releasing v0.8.0, which removes Iron Router, so we'll need to add a means of increasing the body size limit in simple:json-routes (the iron router replacement), and I'll provide a config option whenever that's taken care of. Sorry for being so slow on a resolution for this.

@kahmali kahmali added enhancement and removed bug labels Jun 24, 2015
@heiligeslama
Copy link

Hi, I have the same problem with json-routes and large POST requests. Is there a way to deal with that?
Thanks for you time.

@kahmali
Copy link
Owner

kahmali commented Nov 28, 2015

Hi @heiligeslama. Thanks for reporting this issue. I knew it was coming, as you can see from my comment above :) I filed an issue on the simple:json-routes repo with a suggested fix. If you have the time and means you could always submit a PR for it to get the ball rolling a lot faster. Unfortunately, as I mentioned in the issue over there, I just don't have any free time to devote to this right now.

kahmali added a commit that referenced this issue Feb 24, 2016
- Increases request entity size limit to 50mb
  - Fix #78 and #179
kahmali added a commit that referenced this issue Feb 24, 2016
- Increases request entity size limit to 50mb
  - Fix #78 and #179
@kahmali
Copy link
Owner

kahmali commented Feb 24, 2016

The request size limit has been increased to 50mb in v0.8.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants