meteorhacks / mup-frontend-server

Frontend Server for Meteor Up
37 stars 35 forks source link

error after deploying with mupx #7

Open tcastelli opened 9 years ago

tcastelli commented 9 years ago

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 commented 9 years ago

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

tcastelli commented 9 years ago

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:

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 commented 9 years ago

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 commented 8 years ago

+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.

GQM commented 8 years ago

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

lfilho commented 8 years ago

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 commented 8 years ago

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

ivanthemeh commented 8 years ago

@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 commented 8 years ago

@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 commented 8 years ago

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 https://github.com/kadirahq/meteor-up/issues/172

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

ivanthemeh commented 8 years ago

@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 commented 7 years ago

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

abhirakshit commented 6 years ago

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.