Docker icon indicating copy to clipboard operation
Docker copied to clipboard

504 Gateway Time-out

Open gwiersma opened this issue 5 years ago • 1 comments

When logging in to the dashboard, i receive a 504 gateway timeout. When returning to the main page the user is logged in. After the first 504 the problem is fixed for a couple of hours. When i try to open the dashboard at the end of the day, i receive a new 504 error.

15:12:26 [error] 78#78: *9 upstream timed out (110: Operation timed out) while reading response header from upstream, client: <IP>, server: localhost, request: "GET /dashboard HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: ", referrer: "

First thought was a php-fpm issue so i changed the www.conf to the following settings

[www]
listen = 127.0.0.1:9000

request_terminate_timeout = 120s

pm = dynamic
pm.max_children = 5
pm.start_servers = 3
pm.min_spare_servers = 2
pm.max_spare_servers = 4
pm.max_requests = 500

chdir = /

env[DB_DRIVER] = $DB_DRIVER
env[DB_HOST] = $DB_HOST
env[DB_DATABASE] = $DB_DATABASE
env[DB_USERNAME] = $DB_USERNAME
env[DB_PASSWORD] = $DB_PASSWORD
env[CACHE_DRIVER] = $CACHE_DRIVER

catch_workers_output = yes
access.log = /dev/stdout

[global]
daemonize = no
error_log = /dev/stderr
pid = /tmp/php-fpm.pid

The change didn't help.

gwiersma avatar Mar 24 '20 15:03 gwiersma

I have exactly the same problem ... works perfect on my local machine (macbook) but when I try to run the container on CentOS it stops with this problem .... fastcgi/fpm seems to be running, no other log messages etc.

2021/08/06 09:38:07 [error] 78#78: *1 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 10.33.57.225, server: localhost, request: "GET /dashboard HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000"

scastelein avatar Aug 06 '21 09:08 scastelein