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

error after deploying with mupx #7

Open
tcastelli opened this issue Sep 14, 2015 · 13 comments
Open

error after deploying with mupx #7

tcastelli opened this issue Sep 14, 2015 · 13 comments

Comments

@tcastelli
Copy link

I've tried to update mupx to the latest version and deploy a project that was working before. The deployment says succed and the logs show no errors, however, I always get a 502 error bad gateway from nginx and no url can be seen. (project works on local environment)
Checking docker logs from appname-frontend i see that on every call i get

upstream sent too big header while reading response header from upstream, client: xxx.143.48.92, server: mup-ssl, request: "GET / HTTP/1.1", upstream: "http://xxx.17.0.5:80/", host: "www.xxx.com",

I have SSL configured and tests say it is okay. Any idea on what has been changed?

@arunoda
Copy link
Member

arunoda commented Sep 15, 2015

That's weird. We are also using mupx for Kadira and didn't found something like this.

@tcastelli
Copy link
Author

UPDATE: Problem is related to headers size, not the content in the head section.

I have figured it out, turns out that i was loading too much content inside headers response (long content-security list,etc) and This turns into the previous error (default max header size is between 4 and 16kb depending on your server and nginx version), so in order to solve it:

  • Reduce content in headers check what are you sending in local development
  • If you still need more room for custom scripts in common headers, once you have deployed your app with mupx, call docker ps and check your container appName-frontend id, go to /var/lib/docker/aufs/mnt/CHECKEDID/opt/nginx/conf/nginx.conf and add these lines with your size needs

example

server: {
....
    location:{
     ....
     }
    proxy_buffer_size 8k;
}

and then docker restart appname-frontend should make it work(at least it did for me) :)
Obviously you should keep headers as low as possible, but sometimes you may need an extra 1Kb or whatever, and this can help, however i think this size should also be configurable from mupx if you ask me.

@rootedsoftware
Copy link

This works great until I do another mup deploy and then it overwrites all of my nginx.conf settings. @arunoda how do you get custom nginx.conf settings to stick?

@rorybokser
Copy link

+1. Having many external apis leads to a large header size when using the browser-policy package, and custom nginx configuration would be much appreciated.

indesignlatam pushed a commit to indesignlatam/mup-frontend-server that referenced this issue Apr 14, 2016
In some cases a bigger buffer size would be needed.
@GQM
Copy link

GQM commented Apr 29, 2016

Also experiencing this issue. @tcastelli fix worked for me :) Although it kinda makes the deploy process not so smooth.

@lfilho
Copy link

lfilho commented Oct 8, 2016

Also experiencing this issue. @tcastelli fix worked for me :) Although it kinda makes the deploy process not so smooth.

Same here.
Any progress on this, @meteorhacks, @arunoda ?

Thanks for everyone for their work so far 😊

@ivanthemeh
Copy link

ivanthemeh commented Oct 15, 2016

@tcastelli Im not seeing the any IDs that match up so Im not sure whats going on here, any help please?

@ivanthemeh
Copy link

@lfilho @GQM Hey I am having an issue that is preventing this from working, was hoping for some help if either of you have time. I ran docker ps and none of the ids match with the container ids in the /var/lib/docker/aufs/mnt/CHECKEDID from the @tcastelli post. Any ideas?

@lfilho
Copy link

lfilho commented Oct 15, 2016

@ivanthemeh I also noticed that. I don't know why. I suspect docker change the way it creates these directories under the hood... Let me know if you find out

@GQM
Copy link

GQM commented Oct 15, 2016

I've switched to using kadirahq/meteor-up and had to change the docker image for it to work. This was due the the node dependency change with Meteor 1.4+

Check out this issue zodern/meteor-up#172

I haven't been using mupx lately so can't really help directly with the above issue.

@ivanthemeh
Copy link

@GQM I just tried to use mup since you mentioned it and I used the setup and deploy no problems and I cant even connect to the site using just the ip...lol grrrr. Im losing it...

@sunlee-newyork
Copy link

FYI I reduced the amount of domains in my browser-policy config (specifically BrowserPolicy.content.allowOriginForAll()) and that resolved the 502 error.

@abhirakshit
Copy link

FYI I reduced the amount of domains in my browser-policy config (specifically BrowserPolicy.content.allowOriginForAll()) and that resolved the 502 error.

It worked!! What is this black magic.

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

No branches or pull requests

9 participants