小编Dev*_*kar的帖子

从上游读取响应头时上游超时(110:连接超时)

我是 nginx 服务器的新手。我目前面临的问题是从 iOS 应用程序拨打电话后连接超时问题。我收到的 Json 很大,因此服务器上记录了超时。

还检查了在stackoverflow上发布的各种答案。但没有帮助我。

下面是我的访问日志和错误日志。请帮忙。

错误日志

upstream timed out (110: Connection timed out) while reading response header from upstream, client: xxxxxxxxxxx, server: xxxxxxxxxxx, request: "POST /api/event/gallery HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock", host: "xxxxxxxxxxx"
Run Code Online (Sandbox Code Playgroud)

访问日志

"POST /api/event/gallery HTTP/1.1" 504 192 "-" "mysite/2 CFNetwork/889.9 Darwin/16.7.0"
Run Code Online (Sandbox Code Playgroud)

配置文件

user www-data;
worker_processes auto;
pid /run/nginx.pid;

events {
    worker_connections 768;
    # multi_accept on;
}

http {

    ##
    # Basic Settings
    ##

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    # server_tokens off; …
Run Code Online (Sandbox Code Playgroud)

php nginx amazon-web-services amazon-elb laravel-5.1

7
推荐指数
1
解决办法
2万
查看次数