Open mfrosch opened 4 years ago
@mfrosch did you ever figure out what the problem was?
@AleMadLei sadly not, I just switched to apache
I've got similar "502 Bad Gateway". My personal problem was that after restarting the containers the phpstorm listening process was still on. I've solved it : 1.-) stopping Phpstorm listening 2-) then restart containers and after that turn on Phpstorm listening again.
I'm experiencing the same issue, and completely disabling xdebug by re-commenting all env vars referring to it had no effect.
As additional context, it seems that some errors are correctly caught by the devel system (going to /admin/config/development/devel?demo=error displays all errors to screen AND logs them to docker logging), while errors that seem to leave the page hanging get logged to docker logging, then after a few seconds more cause the nginx bad gateway / apache white page to show up. This could be related to some FPM timeout setting.
The logs show this additional error when whitescreening: upstream prematurely closed FastCGI stdout while reading response header from upstream. I tried playing with NGINX_FASTCGI_BUFFER_SIZE but it had no effect.
LOL Stoping PHPStorm debug listen feature really helps.
Codebase Custom Drupal 8 Setup
Describe your issue The setup is working, but if I produce some error in the code, I get a "502 Bad Gateway" from nginx. In Drupal Watchdog Logs I can see the original PHP error.
For development I would like to print the error's directly in browser. NGINX_ERROR_LOG_LEVEL: debug is set. I also tried apache instead of nginx, but there I also dont get shown the error. If I run the site without docker, e. g. with xampp on windows, the error's are printed out.
I've did some research and upgraded the nginx and apache Tag Versions, but this didn't help me out.
Do you got a clue?
Output of
docker info
Client: Debug Mode: falseServer: Containers: 22 Running: 7 Paused: 0 Stopped: 15 Images: 10 Server Version: 19.03.8 Storage Driver: overlay2 Backing Filesystem:
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 4.19.76-linuxkit
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.943GiB
Name: docker-desktop
ID: Q34G:6IWX:E7YL:GKJP:LMFB:GCK3:LGJ2:KVZQ:TL3X:DNLF:PNYZ:37SD
Docker Root Dir: /var/lib/docker
Debug Mode: true
File Descriptors: 98
Goroutines: 132
System Time: 2020-05-22T15:35:36.291408911Z
EventsListeners: 5
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Contents of your
docker-compose.yml
Contents of your
.env
Logs output
docker-compose logs