Then I looked at the nginx logs that indicated a problem with the upstream php fpm server as shown above. I know my app is being called successfully because Im tailing my PHP apps log and I can see. Ok, I solved my problem, that's how I did it: docker run -i -t ubuntu /bin/bash. Have some ideas about what can it can be? I'm sure that the default.vcl of varnish is correct, something else is wrong. Im using PHP and Apache with nginx for a reverse proxy, all on Docker, and I have a couple of long running calls that are timing after 60 seconds, resulting in a 504 Gateway Time-out.
#DOCKER NGINX GATEWAY TIMEOUT CODE#
Now I have another problem, in my development server I can use varnish with docker correctly but in my production server (is exactly the same as the development, plesk obsidian with centos 7) its not working, always getting the varnish connection error:Įven with the varnish configured correctly, the same as in development, something is making this conection fail and I tested a lot of things but its still the same. The 504 (Gateway Timeout) status code indicates that the server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request.
Bn có th ngn chn iu này bng cách tng thi gian ch NGINX ca mình.
I had to activate https with Really simple SSL plugin on wordpress, deactivate https redirection on plesk and add the next configuration in 'wp-config.php' :Īlso testing varnish on a wordpress where I was logged in was always giving me 'x-cache: MISS', but if I test that in incognito or proxy it actually says HIT so it seems to be fine. Thi gian ch NGINX mc nh là 60 giây nu bn ã tng thi gian ch PHP-FPM ca mình trên 60 giây, NGINX s tr v li 504 Gateway Timeout nu ng dng PHP ca bn không phn hi kp thi. When I click finish, it starts loading and creating tables in the database (I can see the tables being created in phpmyadmin) and then after a while I get a 504 gateway timeout. I create an admin user and provide the credentials and connectionstring for my database. So finally I could run varnish with docker on my development server, I had a lot of trouble making wordpress running in https with varnish, always gave me infinite loop redirection but at the end it worked. The first option it is when your server, php-fpm or Apache has not enough system resources such as memory or CPU. Then I downloaded the nextcloud docker and tried setting the web interface up.