D
D
Dmitry Tarasov2020-02-16 12:22:04
Nginx
Dmitry Tarasov, 2020-02-16 12:22:04

Why does 504 Gateway Time-out docker(nginx, php, mysql) occur?

There is a project here .
I ran the project through docker-compose up sometimes it didn't run, but I restarted and everything worked.
Today I launch and do not want to do anything. In the nginx logs it says

2020/02/16 09:08:30 [error] 6#6: *1 upstream timed out (110: Connection timed out) while connecting to upstream, client: 172.23.0.1, server: test-doc-fast.loc, request: "GET / HTTP/1.1", upstream: "fastcgi://52.209.63.28:9000", host: "test-doc-fast.loc"

Well, when you open test-doc-fast.loc, it gives 504 Gateway Time-out
What could be the reason?
I have another local project with the same docker-compose, only in a different folder, but I always run them separately.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2020-02-16
@fast-je

when you run it and it doesn't start, look at the logs, something didn't take off and you need to understand why.
you can guess whatever. for example, the container with mysql did not have time to rise, so php does not respond and therefore the front gives 504.
try starting like this
first mysql , a couple of seconds of pause, after everything else
docker-compose up -d mysql
docker-compose up -d

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question