Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Heroku limit the request size?

I'm trying to submit a form with a file to 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 "Request Entity Too Large" error for files larger than 1M.

How does Heroku put this limit and how it can be changed?

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

like image 834
grigy Avatar asked Nov 01 '22 14:11

grigy


1 Answers

I forgot to post the resolution. The problem was only for that app. I tried to create a new app and it worked fine. So I think it was related to the specific server instance that the initial application was using. On another instance the problem didn't exist.

like image 86
grigy Avatar answered Nov 15 '22 10:11

grigy