parse-server: Parse server not uploading file > 1mb, logs in server: "client intended to send too large body"
I am using aws elasticbeanstalk for my parse-server deployment. When I upload a file from client, the file doesn’t get uploaded and it stucks on 3% or 4% based on total size.
On AWS elasicbeanstalk I’m getting below log which seems to be the problem. File size is 1.7mb
client intended to send too large body: 1784523 bytes, client: 172.31.46.180, server: , request: "POST /parse/files/file HTTP/1.1", host: "dev-evn.jvfxpepifx.us-west-2.elasticbeanstalk.com"
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 17 (5 by maintainers)
currently solved this issue by adding a .config file in .ebextensions folder with content below:
@aliasad106 thanks, made my day! Simply created
.ebextensions/files.configas described and problem solved.Elastic Beanstalk now has native support for appending the nginx configuration.
For example, add a file
.ebextensions/nginx/conf.d/parseserver.confwith content:I finally got uploading files up to 50M to work. I unhid the files in the folder for my server using this:
defaults write com.apple.finder AppleShowAllFiles YES killall FinderThen, I highlighted the files and compressed them and ran the following code on the zip file to remove the _MACOSX folder Mac’s auto create for it:
zip -d nomnomzparseserver.zip __MACOSX/\*However, although I can upload images up to the 50M which I specified in the .config file, I cannot pull down any of the photos anymore… My iOS app gets this error when trying to pull down the photos:
Error Domain=Parse Code=1 "Response status code was unacceptable: 404" UserInfo={error=Response status code was unacceptable: 404, NSLocalizedDescription=Response status code was unacceptable: 404, code=1}I then turned directAccess to true in my S3 initialization in my Parse server initialization. That caused the error to be a 403 instead of a 404. I then set a policy on my S3 bucket following this and now it is all working properly.
All good now!
if you’ve loaded a new config and then rebuild, that might work? with eb, usually takes some trial and error to figure out 😃 and that’s not the way i’ve done it, so my best suggestion is to play around and find a way where you can verify what the nginx config is…
sorry i can’t help more with your particular setup 😦
Well, before I send you on a wild goose chase, would be good to verify that what I’m suggesting is actually the problem?
Do you know how to
eb sshto your cluster? If you do, you can look at the nginx config and see if it has your new max size value. I’m guessing that it doesn’t.I do my setup different than you do. If i just update code, then I can use the command line to
eb deploy. But if I change the configuration of the cluster (which is what you are doing), then I create a new cluster (aka environment) witheb create, and that new environment will be created with your new changes…did you rebuild your environment?
pretty sure you’ll need to do that if you changed your config.