How does Heroku limit the request size?

I am trying to submit a form with a file to a Node + Express server. I set the bodyParser limit to 5M:

app.use(express.bodyParser({ limit: '5mb' }));

      

It works fine on local machine. However, on Heroku, I get the "Request Entity Too Large" error for files larger than 1MB.

How does Heroku set this limit and how can you change it?

EDIT: The actual error is generated by nginx and not by the node app: enter image description here

+3


source to share


2 answers


I forgot to post the resolution. The only problem was in this application. I tried to create a new application and it worked great. So I think it was related to the specific server instance the original application was using. In another case, the problem did not exist.



0


source


You may need to reorder your config instructions, see this answer: fooobar.com/questions/28015 / ...



0


source







All Articles