Skip to content
This repository has been archived by the owner on Aug 3, 2018. It is now read-only.

Bad Gateway error on bigger code changes #31

Open
mhavelant opened this issue Nov 2, 2017 · 4 comments
Open

Bad Gateway error on bigger code changes #31

mhavelant opened this issue Nov 2, 2017 · 4 comments

Comments

@mhavelant
Copy link

mhavelant commented Nov 2, 2017

Hi!
Whenever I try to do a major code update (composer update drupal/core for example) my sites just return 502 and I have to stop the environment, docker rm the nginx container and up it again. This happens on multiple projects.

Our used image

  • wodby/drupal-nginx:8-1.13-2.4.2

However, updating to wodby/drupal-nginx:8-1.13-3.0.1 doesn't help either, it produces the same thing.

Environment:

  • Ubuntu 16.04
  • Docker version 17.05.0-ce, build 89658be
  • docker-compose version 1.16.1, build 6d1ac219

Also, it doesn't matter if the composer update happens inside the container or on the host, both tend to result in this error.

Additionally, I only have these services enabled:

  • mariadb
  • php
  • nginx
  • mailhog
  • traefik

The site is D8 via the drupal-composer project.

@seanBlommaert
Copy link

I have the same issue, increasing NGINX_FASTCGI_BUFFERS and NGINX_FASTCGI_BUFFER_SIZE also did not seem to help?

The error I get is:
upstream sent too big header while reading response header from upstream

@mhavelant
Copy link
Author

Using the latest images AND adding the following seems to solve it for me:

  • nginx service / environment / NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: "off"

I didn't get the 502 since adding the envs and recreating the images.

@seanBlommaert
Copy link

Just debugged this and found out when a large set of cache tags are added to the Cache-Tags header (in my case this has 4011 characters), the error occurs. Not sure if this is a separate issue, but as mentioned before increasing NGINX_FASTCGI_BUFFERS and NGINX_FASTCGI_BUFFER_SIZE did not seem to help?
If anyone has some tips that would be very welcome!

@webdobe
Copy link

webdobe commented Mar 30, 2018

I have been running into this issue alot I was using the same version Docker version 17.05.0-ce, build 89658be. I have updated my servers and it seemed to resolve a lot of this. There was some networking stuff done in docker 17.10 that may have helped with this.

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

No branches or pull requests

3 participants