'[error] 15372#0: *77 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xxx.xxx.xx.xxx, server: xx.xx.xxx.xxx, request: "GET /payment_auths/stripe_authorize HTTP/1.1", upstream: "http://unix:/var/deploy/myapp/shared/tmp/sockets/puma.sock/payment_auths/stripe_authorize", host: "xx.xx.xxx.xxx", referrer: "http://xxx.xxx.xxx.xxx"'
I tried to solve it from couple of days but I did not found any solution regarding this.
When I hit any proxy server request having redirection response Like LinkedIn/Google+ login using Omniauth I got the same error. I am using Rails 4.2.6 and Ruby 2.1+
Here the nginx config file
upstream puma_myapp {
server unix:/var/deploy/myapp/shared/tmp/sockets/puma.sock fail_timeout=0;
}
server {
listen 80;
client_max_body_size 4G;
keepalive_timeout 10;
error_page 500 502 504 /500.html;
error_page 503 @503;
server_name xx.xx.xxx.xxx;
root /var/deploy/myapp/current/public;
try_files $uri/index.html $uri @puma_myapp;
location @puma_myapp {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://puma_myapp;
# limit_req zone=one;
access_log /var/deploy/myapp/shared/log/nginx.access.log;
error_log /var/deploy/myapp/shared/log/nginx.error.log;
}
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
location = /50x.html {
root html;
}
location = /404.html {
root html;
}
location @503 {
error_page 405 = /system/maintenance.html;
if (-f $document_root/system/maintenance.html) {
rewrite ^(._)$ /system/maintenance.html break;
}
rewrite ^(._)$ /503.html break;
}
And the server specifications

Please help what I need to do to solve this problem. Is my server specifications are not upto the requirements.
Sorry, its the problem of 443 port not opened on server