question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Express error: request entity too large

See original GitHub issue

I created a new post with too much content, and express started throwing errors.

Saving Failed!

I inspect in to it and its related to express data post limit. I have to change the file core/server/middleware/index.js to make it work

// Body parsing
    blogApp.use(bodyParser.json({limit: '50mb'}));
    blogApp.use(bodyParser.urlencoded({extended: true, limit: '50mb'}));

Is there a better way to set limit via config.js ??

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
marcoliceticommented, Mar 14, 2016

It would be nice to have a dedicated setting instead of having to manually change that lines.

I know 1mb is a reasonable limit for textual content, but I plan to add a few base64-encoded pictures in my posts. In such scenario, that limit could be too low.

1reaction
devilankur18commented, Oct 31, 2015

@ErisDS I also thought that my nginx was causing the problem, but as I started debugging, it as not nginx. Nginx has no error logs, and the max-post size was already 100mb there.

Here is the post which was causing the problem in creation. Everything got fixed after I have added added 2 lines of code mentioned above.

http://blog.smugglr.co/2015/10/23/we-made-it-open-season-and-got-100s-of-agencies-as-users/

@ErisDS I think you misread the limit size, its 100kb not 100mb on https://github.com/expressjs/body-parser#limit

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Error: request entity too large - Stack Overflow
The HTTP 413 Payload Too Large response status code indicates that the request entity is larger than limits defined by server; the server...
Read more >
How to Fix “413 Request Entity Too Large” Error in Node.js
As explained in MDN, the HTTP 413 Payload Too Large response status code indicates that the request entity performed by the client is...
Read more >
How to fix the request entity too large error in Express - Reactgo
In express, we use the body-parser middleware to parse the data from the incoming requests, and also it sets the default request body...
Read more >
Nodejs 413 request entity too large error | End Your If
There are several ways to resolve this issue. First, you should check with your hosting provider to see what settings they recommend.
Read more >
What Is a 413 Request Entity Too Large Error & How to Fix It
A 413 HTTP error code occurs when the size of a client's request exceeds the server's file size limit. This typically happens when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found