Multiple '504 errors' are shown on SSL pages or it takes a lot of time to load the website page. This can be fixed by restarting the 'apache' service, but the problem reoccurs.
In domain logs
/var/www/vhosts/example.com/logs/ the following error can be found:
2013/11/15 03:32:13 [error] 12699#0: *5042589 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 18.104.22.168, server: my.domain.com, request: "GET /wp-login.php HTTP/1.0", upstream: "https://22.214.171.124:7081/wp-login.php", host: "my.domain.com", referrer: "https://my.domain.com/register/"
Timeout error is often caused by issues on the backend connection that is serving the content. To fix this, first, you have to figure out what configuration you are using.
For Nginx as Proxy (php-fpm disabled)
To apply settings globally, increase the timeout values by creating the file
/etc/nginx/conf.d/timeout.confand restarting 'nginx' service:
# cat /etc/nginx/conf.d/timeout.conf
proxy_connect_timeout 600; proxy_send_timeout 600; proxy_read_timeout 600; send_timeout 600;
To increase timeout settings for a particular domain, add the lines mentioned above to 'Additional Nginx directives' at:
Plesk > Subscriptions > example.com > Websites & Domains > example.com > Apache & nginx Settings
For Nginx + FastCGI (php-fpm enabled)
Increase the value of
max_execution_timedirective (by choosing the value from the drop-down menu or by setting it manually) at:
Plesk > Subscriptions > example.com > Websites & Domains > example.com > PHP Settings
fastcgi_read_timeout 300directive inside the 'nginx' virtual host configuration at:
Plesk > Subscriptions > example.com > Websites & Domains > example.com > Apache & nginx Settings > Additional Nginx directives
Add/increase the following values in the 'http' section in the
fastcgi_buffers 8 128k; fastcgi_buffer_size 256k;
Restart 'php-fpm', 'apache' and 'nginx' services.