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

后端 未结 11 1881
余生分开走
余生分开走 2020-11-28 19:47

I have Puma running as the upstream app server and Riak as my background db cluster. When I send a request that map-reduces a chunk of data for about 25K users and returns i

11条回答
  •  执念已碎
    2020-11-28 20:10

    First figure out which upstream is slowing by consulting the nginx error log file and adjust the read time out accordingly in my case it was fastCGI

    2017/09/27 13:34:03 [error] 16559#16559: *14381 upstream timed out (110: Connection timed out) while reading response header from upstream, client:xxxxxxxxxxxxxxxxxxxxxxxxx", upstream: "fastcgi://unix:/var/run/php/php5.6-fpm.sock", host: "xxxxxxxxxxxxxxx", referrer: "xxxxxxxxxxxxxxxxxxxx"
    

    So i have to adjust the fastcgi_read_timeout in my server configuration

     location ~ \.php$ {
         fastcgi_read_timeout 240;
         ...
     }
    

    See: original post

提交回复
热议问题