S
S
Shurik2020-12-25 14:44:41
PostgreSQL
Shurik, 2020-12-25 14:44:41

Why does a 504 website error occur on a c nginx postgres server?

Hello. I have a working site in docker on yii2 and postgres. When transferring to vds, I can't start it - it gives either a 504 error or a PDOException: SQLSTATE[08006] [7] timeout expired in /var/www/html/site.ru/vendor/yiisoft/yii2/db/Connection.php :705.
After the call stack:
Additional Information:
Array
(
[0] => 08006
[1] => 7
[2] => could not connect to server: No route to host
Is the server running on host "172.17.0.1" and accepting
TCP /IP connections on port 5432?
)
phpinfo() says pdo_pgsql is active, though version 9.2.24, while postgres on the server is 13. I don't know if that matters.
Another site on yii2 and mysql is running on this server. I can connect to postgres via pgadmin from my home computer, port 5432 is open and the postgresql service is added to the firewall exceptions.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
galaxy, 2020-12-25
@svisch

172.17.0.1 - non-public address, how do you connect to it from your home computer?
Check which addresses the postgres server is hanging on.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question