upstream timed out (110: Connection timed out) while reading response header from upstream

Posted 2 years ago by eddieace

I get this error when I run GET requests in my commands. This is the error I get in the log

upstream timed out (110: Connection timed out) while reading response header from upstream, 
client: xx.xxx.xxxx.xxx, server: stage.myapp.cpm, request: "GET /script/run HTTP/1.0", 
upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock", host: "stage.myapp.cpm,"

As I have understood I should change som settings but i don' know how and where?

Should I change something in sites-enabled? Here is an example

# FORGE CONFIG (DOT NOT REMOVE!)
include forge-conf/test.test.com/before/*;

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name test.test.com;
    root /home/forge/test.test.com/current/public;

    # FORGE SSL (DO NOT REMOVE!)
    ssl_certificate /etc/nginx/ssl/test.test.com/121138/server.crt;
    ssl_certificate_key /etc/nginx/ssl/test.test.com/121108/server.key;

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers 'XXX-XXX_XXX$
    ssl_prefer_server_ciphers on;
    ssl_dhparam /etc/nginx/XXX.pem;

    index index.html index.htm index.php;

    charset utf-8;

    # FORGE CONFIG (DOT NOT REMOVE!)
    include forge-conf/test.test.com/server/*;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    access_log off;
    error_log  /var/log/nginx/test.test.com-error.log error;

    error_page 404 /index.php;

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
    }

    location ~ /\.ht {
        deny all;
    }
}

# FORGE CONFIG (DOT NOT REMOVE!)
include forge-conf/test.test.com/after/*;

Please sign in or create an account to participate in this conversation.